by gregwebs · 18y ago · 0 comments
In a similar vein, I wonder about the Erlang hype - some things are really impractical to do in Erlang, for lack of syntactic sugar and the immutable memory constraint. People were always bickering about the constraints in Java (no multiple inheritance and stuff like that), so why choose another language with impractical constraints instead?
Tree = Branch Tree Tree | ILeaf Int | SLeaf String
then a list like [ILeaf 1, SLeaf "foo"]. Another way to go takes advantage of type erasure. Currently it's just a popular extension but it lets you have lists of stuff in the same type class.
A good example is "Show" you can have a list off stuff that knows how to turn itself into strings. always a handy thing.
Basically you get the big two, group things based on what they are, or group things based on what you can do to them.
Perhaps there is a big pile of random stuff you want to hang on to, but i'd bet 99.9% of the time you really want to collect the stuff into a coherent type.
Perl6, may it rest in peace, had that feature in its spec.
I'd love to just sudo apt-get install arc in this lifetime.
git clone git://ycombinator.com/arc.1.0.0Should we arrange another Lightweight Languages day at MIT for this?