Void is a value.
[Thread Prev] | [Thread Next]
- Subject: Void is a value.
- From: Ori Bernstein <ori@xxxxxxxxxxxxxx>
- Date: Sat, 19 Dec 2015 01:30:13 -0800
- To: myrddin-dev@xxxxxxxxxxxxxx
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
- Prev by Date: Re: Traits with Auxiliary Types
- Next by Date: Thinking of A Release
- Previous by thread: Re: Traits with Auxiliary Types
- Next by thread: Thinking of A Release
- Index(es):