Harmon Nine wrote:
Why is “unit” (as opposed to, say, “frozboz”) the non-descript value to bind a variable to when any atom would do? Is there a history behind this, e.g. was it taken from another language?

I am not sure, but I think it first appeared in functional languages. Functions that do some side effects, but don't return a result, just return "unit". It is used as a value with no semantics.

The name "unit" comes from the fact that the type of "unit" only has one possible value. If you write the type Unit as a set of values, you have Unit={unit}.

Cheers,
raph

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to