March 03, 2014
On Saturday, 1 March 2014 at 13:54:49 UTC, Araq wrote:
>> Araq: could you list the problems you see in the OO world?
>
> I could list the problems, but that would fill books. So, I'll focus on a single aspect instead here: "Favour composition over inheritance". This is commonly regarded as the better solution (and I agree with it btw). Ok, fine, so we favour composition and don't use inheritance. If we don't use inheritance we have no subtyping either

Favouring composition over inheritance means not to create too deep class hierarchies. It doesn't mean not to make use of inheritance anymore at all. The deeper a class hierarchy the more inflexible: if you change the parent class of a class in a big hierarchy tree you break a lot of things (all subclass of the classs with the changed parent class are affected). So create light hierarchies and then go with composition. Overriding inherited methods is still a great way to achieve flexibility without breaking encapsulation.
March 03, 2014
On Sunday, 2 March 2014 at 01:28:32 UTC, deadalnix wrote:
> So, to make refactoring easier, you refactor. I knew the functional crowd liked recursence, but I just learnt that tail recusrion can also be used to crate circular logic.

I can't find what I'm thinking of, but Conditional Proof seems to be close:

http://en.wikipedia.org/wiki/Conditional_proof

This was used in my philosophy class. You start with an assertion, then list off things which are true because of it until you come back and the only logic conclusion is that the assertion was true.
March 03, 2014
On Saturday, 1 March 2014 at 16:27:45 UTC, Araq wrote:

> That's an ADT then, not OOP. (I follow Cook's definition of OO here.)
>
>> 2. Encapsulation and information hiding
>
> That's a module system, not OOP.

Can you create an instance of a module? Then it's not an object in the sense of OOP.

1 2 3 4 5
Next ›   Last »