26

Re: What for inheritance is necessary

Hello, vdimas, you wrote: V> Udachnost of design here is orthogonal to tool characteristics. To stick a hogwash it is possible in any technics. Really successful design minimizes probability of a hogwash.

27

Re: What for inheritance is necessary

Hello, iZEN, you wrote: BE>>>> I Walk here on interviews. And here already twice me asked what for inheritance is necessary. A C>>> That is reserved to increase connectivity and to add unobvious interactions. To decorate with casual overlappings of functions of base class. V>> it is true for any method of implementation of parametric polymorphism. V>> even as it is in the functional languages, type of Haskelja. V>> you Suggest to refuse parametric polymorphism at all?) ) ZEN> "Object-oriented lies" - https://www.youtube.com/watch?v=lfdAwl3-X_c What for this link? The dude at deeply adult age learned that there is not a unique canon of OOP. He did not see before neither Smalltalk, nor Erlang, the ten more similar means, and ran into religious ecstasy of that saw something new. OK, happens. Then it suddenly from it passes to invariable objects (and speaks like in Russian, but the word "invariable" is not known to it), in spite of the fact that in system OOP "a class it something with the behavior, instead of a dump of the data" the invariability is almost useless. Then it criticizes static methods though to any who learned Java at least day, it is clear that it simply method of grouping of methods in some position in hierarchy, and that absence of object is inevitable in some cases (and to anchor to it object only for the sake of grouping - from a bad head to feet operation). And then generally rushed a method of an owl - "become hedgehogs, my strategy ". I am glad for it that at adult age it did not forget to be surprised and make out the surprise by clear words, but is better it is described by one old  a phrase - "the National Russian dish - porridge in a head". And the most important thing - at what here inheritance? I saw a lot of criticism of inheritance (more precisely, implementation inheritance if to be strict), but I did not see uniform point of criticism of inheritance and parametric polymorphism. Surrenders to me, the colleague that you or missed the mark with the link, or simply threw at random...

28

Re: What for inheritance is necessary

Hello, netch80, you wrote: N> Surrenders to me, the colleague that you or missed the mark with the link, or simply threw at random... I Recognize - overshot. But Egor much opened eyes on philosophy of wrong application of OOP: objects as data structures with the broken encapsulation (JavaBean) and application (POJO). Here you will reflect that generally happens the last 20 years to OOP and Java, in particular. Whether these heapings of "crutches" from OOP (encapsulation which is not present, inheritance which try to avoid, and polymorphism which is not necessary) for the sake of only - emulation of procedures are necessary?

29

Re: What for inheritance is necessary

Hello, BlackEric, you wrote: BE> the Answer that for the extension and redefinition of a functional of base classes did not suit them. Sit down, two! Barbara Liskof's principle. If it is clear for describing, a class it is possible  inheritance, but not to redefine. There is a well-known example of complexity of this rule - that should be inherited, a class of a square from a rectangle, or on the contrary. Actually - not that and not another. For example, the programmer an using class of a rectangle and on which palmed off a square, will expect that at it for change of width the length, and on the contrary will not change.

30

Re: What for inheritance is necessary

Hello, BlackEric, you wrote: BE> I Walk here on interviews. And here already twice me asked what for inheritance is necessary. BE> the answer that for the extension and redefinition of a functional of base classes did not suit them. As an example I start to result the set dresser, C# extension methods and.. . BE> Something I cannot even  what answer there it was expected. For relation implementation is, i.e. sub type. Type specification. It is necessary to look any principles of substitution Liskov,  and contracts. In OOP the class is a dual thing, it both type, and the unit. The unit - we expand. Type - we specify. But it is still more interesting. The copy too is both the unit, and type. From it as it is possible to be inherited. First ten years people are confused

31

Re: What for inheritance is necessary

Hello, vmpire, you wrote: BE>> Something I cannot even  what answer there it was expected. V> at me tomorrow just interview, here also I will ask the candidate that answered?

32

Re: What for inheritance is necessary

Hello, neFormal, you wrote: V>> At me tomorrow just interview, here also I will ask candidate F> that answered? Did not come