Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualSimonForsman

Posted 27 February 2013 - 01:34 PM


I think they must mean, and not sure because it's been a while since I touched Java, but getting rid of the versions of primitive types that don't behave like objects, Like in Java, isn't there int and Integer? and of those only Integer would let you do introspection and could be inserted into the old-style Java containers in which the data values had to inherit from Object and so forth. With Integer in theory you could do some like 2.ToString()...

IIRC, this is basically part of it.
the idea would basically putting a layer of gloss over int vs Integer, making it look more like 'int' was simply an instance of Integer, ...

practically though, you can't really (actually) get rid of primitive types and have any semblance of performance.

I could be wrong though, given I am not really a Java developer...


You can remove primitive types from a high level language without losing performance as long as the compiler is good enough to cut away the overhead when its not needed.
This is an advantage all high level languages have, they are usually free to do almost whatever they want with your code as long as the result doesn't change. (Actually writing a compiler that can perform great optmizations is the hard part (and we're still not at the point where compilers always do a better job than a skilled programmer))

#1SimonForsman

Posted 27 February 2013 - 01:28 PM


I think they must mean, and not sure because it's been a while since I touched Java, but getting rid of the versions of primitive types that don't behave like objects, Like in Java, isn't there int and Integer? and of those only Integer would let you do introspection and could be inserted into the old-style Java containers in which the data values had to inherit from Object and so forth. With Integer in theory you could do some like 2.ToString()...

IIRC, this is basically part of it.
the idea would basically putting a layer of gloss over int vs Integer, making it look more like 'int' was simply an instance of Integer, ...

practically though, you can't really (actually) get rid of primitive types and have any semblance of performance.

I could be wrong though, given I am not really a Java developer...


You can remove primitive types from a high level language without losing performance as long as the compiler is good enough to cut away the overhead when its not needed.
This is an advantage all high level languages have, they are usually free to do almost whatever they want with your code as long as the result doesn't change. (Actually writing a compiler that can perform great optizations is the hard part)

PARTNERS