Record selectors

Matthias Lang matthias@REDACTED
Mon Jan 13 00:36:20 CET 2003


Daniel Dudley writes:
 > Thanks for your imput, lads. I think I'll conclude that
 > Erlang's implementation of records is a mess (a wart on
 > Erlang's bottom as Matthias puts it) and thus best avoided.
 > They must be a big embarrassment to Erlang. In fact, I
 > should think it would be a great service to the community
 > if records (in their current form) were phased out as soon
 > as possible. Call it an experiment that went horribly wrong.

An embarrassment, yes, but not a huge one. Nor has the experiment had
horrible effects beyond a bit of ugly code and a few gotchas.

If you're out to have fun by trying something new, I'll be so bold as
to recommend temporarily accepting the lack of a complex type system
and moving on to some of the things which are unique to
Erlang. Specifically: the medium-grained & explicit concurrency, a
neat message passing model, painless distribution, hot code loading
and the 'kill-the-process' approach to handling errors.

Distribution and code loading create some interesting problems which
make a more ambitious type system rather more interesting than they'd
otherwise be.

Aside: I was given a copy of the Erlang book and told to "learn it" when
       I started work for Ericsson in Melbourne a few years ago. I
       noticed that one of the authors' surnames was "Wikström" and
       assumed it was the same Wikström behind ML. 

       I soon noticed that Erlang seemed to lack a type system and
       wondered what on earth had happened to Wikström---what made
       him go from designing a language with a very nice, strict
       type system to designing a language where types have very
       little importance?

       Eventually, I met the Wikström fellow and discovered that he
       wasn't the same Wikström of ML fame. But by then I wasn't 
       interested in type systems any longer anyway :-)

Matthias 



More information about the erlang-questions mailing list