Enhanced type guard syntax]
Peter-Henry Mander
erlang@REDACTED
Fri Sep 19 13:35:24 CEST 2003
Thomas Arts wrote:
> Dear Peter
Hi Thomas,
> If you want to extend that principle with user defined types, you
> might do that by tuples and a lot of work, or add something to
> the internal representation. No matter how, you need a representation
> for it.
>
> Static type checking may use the same representation as the
> dynamic one, but checks at compile time whether there is a
> type conflict. At runtime there need not be any type information
> available, since you are guaranteed (by the checker) that you
> will never add an integer to an atom.
Thanks for explaining that, I forgot the static/dynamic aspect.
So (including aspects in an email to Vlad) this has an impact on:-
1) code correctness and checking during compilation, without added
"binary-baggage" at runtime,
2) trapping exceptions at runtime, which is what tagging was meant to
achieve, albeit clumsily, I concede.
3) optimisation (maybe?).
More information about the erlang-questions
mailing list