[erlang-questions] Current term representation?

Richard A. O'Keefe <>
Wed Jul 16 01:54:37 CEST 2008


On 15 Jul 2008, at 8:56 pm, Mikael Pettersson wrote:
> By "the rest" do you mean terms in general or just funs?
> If terms in general, what were you hoping to be wrong?

I meant the rest of the information specifically about funs.

Nobody, least of all me, was suggesting a special tag for
empty tuples, merely that they could fit into one of the
immediate classes.  It does mean that if you want to
represent the equivalent of Haskell's (Maybe [t]), that
is an optional list, where an empty list not the same as
no list, then {} | list(T) is not a good choice; it is
better to use an atom, e.g., undefined | list(T).  It will
take less memory, be quicker to match, and clearer to read.

--
If stupidity were a crime, who'd 'scape hanging?










More information about the erlang-questions mailing list