17

I have that friend who keeps telling me that he doesn't like java just because it's slow! (I hate this excuse).

Friend: look what java did to Android, it's because of java that iOS is faster tham Android.

Me: whaaat!! do you know that Android OS have nothing to do with java? it's C++ you...

Friend: No it's Java, we develop Android apps with java

Me: 🔫

Comments
  • 1
    Bloody ethanol inhalers.
  • 1
    Personally I just felt like Java was too restrictive and old. It was the first language I mastered, but after learning C++ I didn't want to go back. But that's just my opinion.
  • 3
    @IamGoD isn't C++ older than JAVA?
  • 1
    @ocalderon I believe so, about every 3 years a new c++ standard comes out and we get cool new language features!

    c++ also adds new syntatic sugar to the language regularly (as opposed to just getting new library features every release).

    The biggest change Java has made in years was the addition of Lambda expressions in java 8 and the ability to not write generic type information inside the angle brackets on the right side of the assignment operator in java 7.
  • 3
    Most of these idiots don't even know how Android works.They can't even code in pure Java without Android. They are just good at using android studio and stuffing more dependencies into their build.gradle
  • 1
    I hate it when people tell me that Java is slow. I hate it even more when it comes from people that only code in interpreted languages. I literally forget about all sorts of politeness when shit like that comes. Last person that told me this shit was a JS developer. Ok Java is slow compared to C++, C, but by not that big of a margin. But web developers that give me this shit from the land of Js, django, php or rails have 0 knowledge of what they are talking about. I get it, hello world scared you in Java...geez.
  • 0
    @IamGoD Java 9 adds some pretty cool shit
  • 1
    @AleCx04 An argument against Java based on preformance is not a very good one nowadays. The JVM is amazing (and JIT is lightning fast), but Java specifically is not the nicest language in the world. I doubt Java will be used in anything other than legacy here in 10 years, but the JVM ecosystem will thrive for a long time to come for sure.
  • 0
    @AL1L The module system?
  • 0
    @Zennoe she said something along the lines of "oh I dislike Java, it is seriously slow, I much prefer Node for that sort of thing" I just could not believe it. Sure Node is great dont get me wrong, but speed wise it really pales in comparison!
  • 0
    @IamGoD I doubt that it will fall out of favor, specially considering the tech that uses it. Spring is to this day one of the best and most in demand frameworks in existence. And even if people dislike the language then fine, there are many great languages for the JVM such as Scala, Kotlin and Clojure (my personal favorite)
  • 1
    @AleCx04 Yup, I agree that the JVM ecosystem is great. I just don't personally like the language as I think it is seriously restrictive.
  • 0
    @ocalderon haha yes, it's much older.
  • 0
    @IamGoD You're clearly not very exposed to Java language updates. Trust me I'm all over C++11/14/17 and a huge fan boy, but I wouldn't make statements about Java like you did.
  • 0
    @Hastouki What statement are you referring to? I have said that Java is seriously restrictive and that Java doesn't get many language level additions like C++ does (and most modern languages for that matter).

    What major changes has java (the language, not the java standard library) undergone that I haven't mentioned already?

    Also, c++17 is awesome! :D
  • 1
    @IamGoD I also find it restrictive. Guess I got used to it. I try to use other languages, specially for the web at least.
  • 1
    @IamGoD You're seeing a lot of improvements to C++ because for a long time (pre C++11), C++ was way behind in terms of "modern" language festures. I'm not a Java fanboy, just have noticed new features introduced over the last few years that make me go "huh that's cool". You're probably right that it's not that much stuff, but the language itself isn't really lacking in features as it's had much more consistent updates over the years compared to C++.
  • 1
    @Hastouki I would argue that Java is lacking many good features such as:
    • Generics with primitive values
    • Operator definitions in classes
    • passing functions as pointers (rather than an anonymous inner class or a lambda assigned to a functional interface)
    • primitive references
    • auto
    • compile time if statements
    • macros
    • lambda variable capture
    • static function variables
    • Multiple inheritance
    • Structs
    • Bitfields
    • ASM interface (from c)
    • typedef
    • etc

    I guess garbage collection would be nice though (but smart pointers make life easier)...and I really wish c++ had reflection!
  • 0
    @IamGoD And let me ask.
    Why would java have pointers and ASM interface like C? Isn't that the whole point of high level languages?To hide those things from the Developer? If you need them java has JNI for you.
  • 0
    @IamGoD For the rest, here is your options.
    1.Generic with primitives---> Java has all primitives as classes. int has Integer, double has Double etc.
    2. Java has operator overloading too from Object
    3. passing as pointers---> Java doesn't need pointers as i have mentioned as everything is passed by reference by default.
    4. primitive reference --> As I said java has all primitives as classes too.
    5. auto --> Java has Object.You can cast any class back and forth between Object.
    6. static function variables: Haven't heard of static in java dude?
    7. Multiple inheritance: This is well explained by James Gosling and it's not a limitation at all to Developers.
    8.structs and typedef: In java that is achieved by inner classes with properties

    According to me, you probably haven't looked thoroughly through java and you are biased towards c++ because you know it well.
  • 0
    @IamGoD for bitfields you can always declare any class and define your own serialization and deserialization methods
  • 0
    @bdhobare First off, there is no static variables for functions in java. Static variables in funtions are variables that persist for the duration of the program within the scope of the function. Static only works on member functions or variables in java. You obviously don't program much in c++ or you would understand what static funtion variable meant.

    Comparing auto to Object is laughable. Auto is used for type interface, which means it acts like you wrote the full type out by hand. This is so much better than using Object as you don't have to cast it every time you want to call a method.

    ASM interface is useful to have if you want to do some serious optimization, I use it when I program microcontrollers.

    You say the primitive wrapper classes can be passed by reference, but in java they cannot be reassigned a value as primitive objects are immutable. With the reference operator in C++ you can actually reassign values (like a swap function).

    Just to be clear, my list above is very incomplete. There are many more features that just don't exist in java that make c++ a fun language to work in. Don't make the argument that I don't understand java when you barely understood the features I was talking about.
  • 0
    @bdhobare Java is the first language I ever mastered, it is what got me interested in programming. By no means do I hate it! But at the end of the day it lacks many features that other languages have by default.
  • 0
    @IamGoD if you want to persist variables between function calls, you can use static class variables and you'll achieve the same result. For ASM, use JNI
    And, I pretty code alot in c,cpp and Assembly
  • 0
    @bdhobare I mean, you can achieve the same functionality in every language, but I was just pointing out that Java is missing a couple nice features. Anyway, to each his own.

    What assembly language do you know? Arm v7 Assembly over here! :D
  • 0
    @IamGoD C++ needs anonymous classes, and fuck multiple inheritance. :)
  • 0
    @Hastouki Nice try, but c++ has anonymous class! And multiple inheritance is useful in many situations.
  • 1
    @IamGoD I am doing x86-64 after finishing 8086.I can't really say I am a guru in Assembly buy I am confident with my C skills.
  • 1
    @bdhobare I'm in the same boat haha! Good ranting w/ you. Cheers.
  • 0
    @IamGoD C++ anonymous classes are quite different from what Java offers, didn't even know cpp had something like this. If we're talking convenience and "modern feel", Java takes the cake on this one. Let's not even get into the multiple inheritance debate, I just spent a ton of time writing an entity component system for entity composition at run time, just to avoid rigid inheritance ugliness, as most non mental-masochists do.
  • 0
    @Hastouki How are they different?

    I was under the impression that they are pretty much indentical in all but the syntax actual for defining classes in either language.

    From what I have used c++ anonymous inner classes for, I haven't seen a difference.

    Genuinely curious now.
Add Comment