[quote]function prototyes
[/quote]
Yes, it should exist optionally.
Are you kiddin? 4 posts while I’m editing???
Headers and pointers are the two biggest mistakes in C++ and the two things Java got most right, IMHO.
Cas
@matheus23: hygienic macros would be nice.
@damocles: you have gotos…just not unstructured gotos.
@Oskuro: fake mixins by composition.
Every class is bound by a single source file is a good thing for Java.
PS: Give my time to type you heathens!
@Cero - no, sorry, still don’t understand what you feel is missing there. It sounds a little like you want pointer to pointer, but maybe I’m not getting what you mean?
@Oskuro - function pointers (of a sort) are coming with lambdas in Java 8 I believe.
I’m sure you have coded in C++, an asterisk means something is a pointer.
Without looking at more code, I would like to know if a variable is a pointer or holds data itself… Of course, like I said this notion doesn’t even exist in Java since everything is a pointer.
The same confusion that applies to people with C and pointers also applies to compilers, preventing or making very difficult a whole load of optimisations.
Cas
Yes.
Exactly (well, unless they’re primitives) - all variables are pointers unless they’re a primitive. What I don’t understand is what you feel is actually missing here?
The rubbish choices for default access modifiers. Fields should default to private, methods to public.
The general verbosity of java sucks, e.g. when dealing with classes with a single method, e.g. ActionListeners, Runnables, Callables etc. This will hopefully get better in Java 8 with lambdas.
Wildcards in generics suck, or maybe I suck at them.
Some of the APIs suck, like Date/Calendar, URL/URI and the decision to bundle so much stuff in the standard distribution (CORBA anyone?). Hopefully remediated in Jigsaw in 8 or 9.
Still Java is awesome. Going back to c++ again feels like going in a timewarp.
Threads like these, of which we have a bunch. They always end up stating the obvious and feed endless derailments over semantics nobody really cares about but everybody insists them to be phrased correctly from their own point of view. In the end everybody gets tired of the discussion, and nothing of value was added.
Why not keep a thread reasonably limited in scope, as in ‘Struggling with generics in varargs’ instead of ‘Post any annoyance you ever had with Java’ ?
@Riven - +1!
Something Roquen said earlier I think is key
Java ain’t perfect, but what was delivered was pretty darn good - if you’re waiting for a programming language without any annoyances you’ll be waiting a long time.
Or to paraphrase Winston Churchill -
[quote]It has been said that Java is the worst form of programming language except all the others that have been tried.
[/quote]
Indeed. When it comes to java gripes, I could go on and on … but I already have in threads past. All noise, no signal.
[quote=""]
Mind you, no one said that missing C++ features are easy to use or that they can’t lead to disaster, and given the scope of Java, is understandable why they aren’t available.
It’s just things I’ve noticed I could do with in certain frequent situations, but it’s not frequent enough, or I’d just code in C++.
[quote=""]
Sweet!
Headers are not a ‘feature’, they’re a side effect of the first C compilers being one-pass compilers and therefore requiring all functions/etc. being declared up front. Splitting code into header and source files then just becomes a convention as it’s the most sane way to not duplicate declarations everywhere.
They should have been ditched ages ago, but by then they were being (ab)used for all kinds of evil so they’ve kind of stuck around despite being a horrible temporary hack.
I only miss functions as first class citizens and a better native interface.
I’m doing a lot of C++ work at the moment, and it’s incredible how compile times can make your mood super bad. I hate compile times. Any language that doesn’t have that “feature” wins for me. My productivity is more important than 10% more execution speed.
Meh, I still like prototyping, even within the same source file. I usually manage through interfaces or abstract base classes, though. Guess it’s just how I mentally organize code.
I also like templating like mad, and in C++ use namespaces like you’d use interfaces in Java (and I use interfaces in java to define constant structs like you’d use structs or enums), so it could also be that I’m mentally imbalanced.
One thing I do hate with a passion from C++ (just because I love it so much in Java) is the inability to interpret code, so you can refactor, look for references, or even decompile easily.
JNA is a good stab at this (though not the only one). Android support is there (though a bit experimental atm)!
Moved to Misc for obvious reasons
Is this possible? Did I just see moderation? donttakemeserious
I don’t like Oracle and Google, I don’t want the former to kill Java with a crappy business model and I don’t want to the latter to do the same by fragmenting it (imagine what will happen when Android DVM is fully supported on x86, people might have 2 Javas on desktop environments :s).