piggymouse: (Default)
[personal profile] piggymouse

Блог Strange Coding (доступен в ЖЖ как [livejournal.com profile] coding_strange) найден у [livejournal.com profile] yole вот тут.

Полоскать GoF уже как-то и неинтересно, а вот что мне особенно понравилось – это как один человек (я), придерживающийся той точки зрения, что перед тем, как дизайнить большой кусок, нужно внимательно подумать, и другой человек (автор Strange Coding), явно считающий, что код должен расти органически, в процессе перманентного Мирового Рефакторинга, приходят к очень похожим тезисам по одному вопросу:

Avoid inheritance at almost any cost (even to the point of using tons of forwarding functions) unless you're 100% sure you're designing a hierarchy.

When you do find a good place to use inheritance, make your virtual functions protected functions, not the public ones.

P.S. А YAGNI хорош в основном при ловле блох.

Date: 2002-12-23 04:44 am (UTC)
From: [identity profile] caseq.livejournal.com
> P.S. А YAGNI хорош в основном при ловле блох.

К каковой активности примерно половина работы и сводится, в конце-концов ;)

Date: 2002-12-23 08:00 pm (UTC)
From: [identity profile] 109.livejournal.com
Avoid inheritance at almost any cost (even to the point of using tons of forwarding functions) unless you're 100% sure you're designing a hierarchy.

When you do find a good place to use inheritance, make your virtual functions protected functions, not the public ones.


absolutely!

Profile

piggymouse: (Default)
איש אי הכלבים

April 2011

S M T W T F S
     1 2
34 56 789
10 1112 13141516
17181920212223
24252627282930

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 20th, 2026 10:16 pm
Powered by Dreamwidth Studios