3 ms·
It never made sense to learn Java
- sc68cal 16y agoI see no difference between learning C++ and Java first. They both have equal ability to teach bad habits.
- ares2012 16y agoI agree. The author is confusing the language with how well it's used. Java still has the advantage of running within a virtual machine while being faster than interpreted languages. If you don't want to tie yourself to a single platform and require speed, it's still a good choice.
- marssaxman 16y agoHow is running within a virtual machine an advantage? That was one of the most prominent reasons I decided to give it a pass when it first came out.
- MatthewPhillips 16y agoCare to explain?
- sc68cal 16y agoPerfect example: The very first Java program you write when you learn Java. I have never seen anyone provide a sufficient explanation to absolute beginners about what "Public Static Void Main(String args[])" is since they don't have enough background to understand OOP, program arguments, return types, functions, etc.... Most of the time it just becomes a magic incantation to the absolute beginner. C++ is a little better since you don't have to wrap all this inside a class before you even understand what a class is, but really it provides no serious advantages over straight C until the student needs to learn OOP. It's not really the fault of the languages, since the audience for both were programmers that already knew programming concepts. It's the fault of the course & material developers who decided that they'll just teach Java (or C++) so they can stamp out CS graduates, to fulfill the implicit guarantee of a University Education that everyone will get a high paying job. Full disclosure: I think that just teaching straight out of K&R is the best way to introduce programming for CS majors, and a well adopted scripting language for non-CS majors. Extra Full Disclosure: I was in the College of Education studying to be a teacher, with a full background in pedagogy, before I changed to CS.
- teyc 16y agoinsufficient explanation is not necessarily a problem for the first program as long as it is handled later on. Java has chosen to make certain things explicit. These design choices have their tradeoffs. Being easy to grasp fully in the first lesson isn't a priority.
- MatthewPhillips 16y agoOk... I agree but I don't see where the "bad habits" are being learned.
- deleted 16y ago[deleted]
- chipsy 16y agoLanguage bigot calls others language bigots. Film at 11.
- mooism2 16y agoI don't particularly like Java (I'm semi-learning Scala right now, and it's got enough Javaisms in it to make me feel frustrated)... but I like having stack backtraces when my code dies in production, and I very much like not being able to accidentally stomp all over the heap.
- prodigal_erik 16y agoThe performance advantages of C++ over a recent JVM are pretty minor when the price is blowing up randomly. I wasted years on teams trying to make native code not suck, and only once did I witness as much as a single month of uptime achieved after heroic effort. Now I view manual allocation and pointer arithmetic as a form of nerd sniping—just because it's incredibly hard to get 100.0% right doesn't mean you're actually accomplishing much by doing so.
- teyc 16y agoThe author makes several claims, of which unfortunately, I could only agree with the final one. Claims: 1. Projects that shouldn't be written in a scripting language should be written in C++, not Java because it is more efficient. [Author probably hasn't spent enough time debugging other people's C++ which blew up or leaked memory on customers sites] 2. C++ is a better long-term choice (for people who don't poke themselves in the eye with sharp objects) [Precisely. Just like seat belts are only useful for people who have an occassional accident] 3. C++ gc library is as good as Java's GC. [No, listen to Cliff Click's talk. A VM defines boundaries between what is a programmers task, a language's task and a runtime's task.] 4. Java consumes more memory than C++ for equivalent tasks. [The standard class library can be big. Including iostreams in gcc results in 1Mb executable.] 5. Java runs slower [The purpose of programming is to get to the solution to a problem the fastes - Guy Steele. Java has enough safety features.] 6. If you know C++ you know Java (because C++ is bigger) [precisely.] 7. Java is an evolutionary dead-end in language design. [that is only because Java doesn't have Anders Hejlsberg.]