[Haskell-cafe] Re: [Haskell] Dynamic binding
ralfla at microsoft.com
Fri Jun 24 07:21:52 EDT 2005
> 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.
More information about the Haskell-Cafe