RE: [Haskell-cafe] Re: [Haskell] Dynamic binding

Bulat wrote:
if you require several operations, you can pack them in tuple or structure (really, tuple is a structure without field names)
How are we going to anticipate all possible bodies of a for-loop? By comparison, when we build a normal Haskell list, does the construction precisely mirror what we are going to *do* with each element? Fold the map then!!!
if you need fields/interfaces inheritance, then this method will not work. but in 90% of cases it's enough.
What to do for the other 10%?
in C++, creating classes is the most useful method of structuring program, so it is used for any problem - from very simple to most complex. when you translate such thing to Haskell, it's better to see which concrete problem are solved with help of classes, and not to emulate the classes itself (because in this case you will write many unneeded code)
Yes, but we ought to solve the shapes problem. The shapes example is in Bulat's 10% region.
only because it's C-like :) you just can't believe that Haskell program can be 3-10 times smaller while keeping the same functionality :)))
But note that "same functionality" is one thing, having "separate compilation" and "program extensibility" too is another one. Ralf

Ralf Lammel wrote:
only because it's C-like :) you just can't believe that Haskell program can be 3-10 times smaller while keeping the same functionality :)))
But note that "same functionality" is one thing, having "separate compilation" and "program extensibility" too is another one.
As I said, and as is well-known, "extensibility" is a red herring in this context - you merely trade one dimension of extensibility for another one. Cheers, - Andreas -- Andreas Rossberg, rossberg@ps.uni-sb.de Let's get rid of those possible thingies! -- TB
participants (2)
-
Andreas Rossberg
-
Ralf Lammel