[nem-en] incorrect side effect of ++ operator

Kamil Skalski nazgul at nemerle.org
Mon Sep 27 15:01:33 CEST 2004


Dnia poniedziałek, 27 września 2004 14:48, Michal Moskal napisał:
> > void shouldn't be subtype of object
>
> But it is. *Every* type is subtype of object. Period. This is the .NET
> understanding of type system. We can do nothing about it. We should be
> happy, that it is supertype of everything, since our encoding of 'a ->
> 'b functions would not work for int -> void otherwise.

There is nothing to be happy about with void : object. I like the felling that 
*there is no void* and 'a -> void and 'a -> 'b are two unrelated types.
IMHO void should have no representation in runtime, because it just an alias 
for saying "nothing was computed". And now runtime thinks, that instead 
nothind, we have *null* computed, which is very strange.

Ok, void : object is useful in Hashtable <int, void>, but   having [(), ()] is 
a sick idea.

-- 
Kamil Skalski
http://nemerle.org developer




More information about the devel-en mailing list