fun opacity

Vance Shipley vances@REDACTED
Mon Jan 10 15:42:54 CET 2005


On Mon, Jan 10, 2005 at 02:28:20PM +0000, Peter-Henry Mander wrote:
}  
}  ... A fun locks this up in an opaque type and I don't think it's
}  practical to disect a fun instance to recover the arguments. ...

I'm a big fan of opaque values.  If my intention is to pass a value
which is only meant to be used by the caller when it is returned it
is really better that it is opaque.  It's safer that way.  If it's
always observed to be an integer eventually someone will write code 
which assumes it will always be an integer.  Later when I start using
atoms things fail.  If I had my way the language would support that
(not a suggestion, just a principle).

	-Vance



More information about the erlang-questions mailing list