Eigenstate: myrddin-dev mailing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Void is a value.


Void is now officially a value. You can now do things like:

	type intset = std.htab(int, void)

Which implies that you can pass void values around, assign them, and treat
them as first class in general. This should make things nicer for generic
functions.

Note that void is a zero size value, and behaves that way. f : (void -> void)
is not the same as f : (-> void).

	x = void
	f(void)
	g : (-> void)
	f(g())


And as a final note, a bare '->' for return is deprecated, and I'll probably
remove it soon. Instead, use

	-> void

-- 
    Ori Bernstein