Re: How to check variables for uniqueness ?



Chris Uppal wrote:
Mike Schilling wrote:
I believe that the existing mess could have been avoided with precisely
one change to the existing definition of Java: rather than define a char
as a 16-bit integral type, define it as a non-integral type of an
unspecified size. (Exactly like boolean.)

Of even as an unsigned integral type with a size guaranteed to be <= 31 bits.

There would have to have been small changes to the JVM spec, and to the
serialisation spec too (and to JNI -- though that didn't come out until later).
But nothing of staggering difficulty. Even the JVM /implementation/ would be
largely unchanged since chars are represented in 32-bit slots on the stack
anyway...

For proper interoperability it has to be specified what it is.

Arne
.



Relevant Pages

  • Re: How to check variables for uniqueness ?
    ... one change to the existing definition of Java: rather than define a char ... Of even as an unsigned integral type with a size guaranteed to be <= 31 bits. ... There would have to have been small changes to the JVM spec, ...
    (comp.lang.java.programmer)
  • Re: How to check variables for uniqueness ?
    ... than define a char as a 16-bit integral type, ... Of even as an unsigned integral type with a size guaranteed to be <= ... There would have to have been small changes to the JVM spec, ... as the character's UTF-8 representation. ...
    (comp.lang.java.programmer)
  • Re: How to check variables for uniqueness ?
    ... precisely one change to the existing definition of Java: ... than define a char as a 16-bit integral type, ... non-integral type of an unspecified size. ... Of even as an unsigned integral type with a size guaranteed to be <= ...
    (comp.lang.java.programmer)
  • Is wchar_t guaranteed to be larger than char?
    ... reread the section on wchar_t, and unless I'm reading it ... there is no guarantee that wchar_t is larger than char. ... which can be any integral type. ...
    (comp.lang.cpp)
  • Re: What is the advantage of malloc over calloc
    ... 'char'. ... initialization to produce defined result for all _integral_ types. ... integral type other than 'char'. ... # are zero shall be a representation of the value zero in that type. ...
    (comp.lang.c)