Mon Sep 1 16:55:37 CEST 2003
On Monday, September 1, 2003, at 03:45 pm, Mikael Pettersson wrote:
> The callback example isn't the one that motivates me. I'm a diehard
> SML fan, and I love the way SML lets me structure code and create
> multiple specialised instances of generic modules.
I guess this is what I was really asking - the examples given so far do
not provide (to me at least) a very convincing case for adding this
feature to the language. Is there something else about SML which makes
it well suited to this sort of programming? Perhaps you could provide a
nice example where parameterised modules allowed you to do something
very elegantly where it would have been difficult without?
> (I personally don't care for default parameters to modules. I only
> proposed it because you seemed to want a way to either supply a
> given parameter or not -- with the module taking appropriate action.)
I don't have any particular preference either (yet!), this was driven
from thinking about Richard's logger callback example and cases where I
might want to use this pattern.
More information about the erlang-questions