After I mastered Java I can say for sure that I like it much more than C++ which I used for more then 10 years. The things that really annoy me is that Java lacks of operator overloading, unsigned
byte and struct
data types. That why you have to use different hacks to do low level network, video and audio data processing.
I wonder is there any Java-like language (and VM) with unsigned
byte and struct
-like data types? Also why not to extend the Java standard adding these features?
You should check out Scala. It's a different paradigm than C++ since it mixes OOP and functional programming but it has many features you might like in the familiar JVM runtime environment. You will get mixins, case classes, operator overloading and a lot of features that will easily let you implement low level features using high level abstractions without losing performance. For example in Odersky's Programming in Scala there is a great example of how to build a data structure to store 2-bit long fields efficiently but with a nice functional/OOP interface on top of it. This will easily make up for the fact that bytes are still signed.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.