[nem-en] incorrect side effect of ++ operator
Michal Moskal
malekith at pld-linux.org
Mon Sep 27 15:50:05 CEST 2004
On Mon, Sep 27, 2004 at 03:01:33PM +0200, Kamil Skalski wrote:
> 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.
Why?
It would be strange for me, if void couldn't be substitued for a type
variable (which, I recall, means -- *any* type). There would be no way
to write universal function type.
> 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.
What else would you insert there?
--
: Michal Moskal :: http://www.kernel.pl/~malekith :: GCS !tv h e>+++ b++
: ::: Logic is a nice contrast to the Real World. :: UL++++$ C++ E--- a?
More information about the devel-en
mailing list