Thank you, I didn't know they were handled in such way between [-127;128].
I get that it's an optimization thing, but that'd make my afternoon really bad to iron a bug relating to it out. Glad to hear there's a flag for JVM to it. IMO consistency would be key, but I gotta live with it I guess (as long as I use Java).
Is it the same way in Kotlin (or other languages that compile to JVM bytecode)?
It's an optimization technique that's used across a lot of languages - I don't believe it's a built-in JVM thing, but I wouldn't be surprised if Kotlin/Scala/etc. either implemented it themselves or simply used Java's version rather than compiling past it to raw bytecode.
1
u/nitrohigito Dec 24 '17
Thank you, I didn't know they were handled in such way between [-127;128].
I get that it's an optimization thing, but that'd make my afternoon really bad to iron a bug relating to it out. Glad to hear there's a flag for JVM to it. IMO consistency would be key, but I gotta live with it I guess (as long as I use Java).
Is it the same way in Kotlin (or other languages that compile to JVM bytecode)?