ANNOUNCE ex11 release two
Shawn Pearce
spearce@REDACTED
Sat Jan 24 01:27:38 CET 2004
Joe Armstrong <joe@REDACTED> wrote:
> To answer this you need to understand what a fun really is:
Excellent explanation of a fun, and is more or less what I knew of
how funs work. I think what I was going for was more to make it
easier for the developer to write the messages...
> The point to note is that code like
>
> B ! {onClick, fun(X) -> S ! {wrapper, X} end}
> and
> B ! {onClick, {S, Wrapper}}
The first line is much longer to write than the second. So I think
my comment was largely written because I found the second form to be
shorter to type.
> This isn't really true, sending a fun in a message *is* just sending
> a tagged message and because of the way this message is represented
> internally it might even use less space and be more efficient.
This I didn't realize, and now that you make the point, I can see
how a fun might in fact take up less space than a tuple. Saving a few
bytes or a few machine instructions to make it 'faster' is really not
all that important, as the X server alone must be chewing up a good
amount of resources, let alone the ex11 code. I think I just threw
that in as another excuse for why I suggested the second form above.
What a waste of bytes this message is. But we're not counting
bytes are we? :-)
--
Shawn.
Calm down, it's *____only* ones and zeroes.
More information about the erlang-questions
mailing list