Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!

Mike Christianson is a senior Java software engineer from Phoenix, AZ who teleworks for a company in Seattle, WA.  His software engineering expertise is in building customer-focused, craftsmanship-minded rich Internet and web applications.  Tools of his trade include Java, Ant, Jetty, Eclipse, XStream, Agile practices, HTTP, Subversion, cygwin, XML, and JProfiler. Mike is a DZone MVB and is not an employee of DZone and has posted 12 posts at DZone. You can read more from them at their website. View Full User Profile

Your Programming Language Sucks?

06.15.2012
Email
Views: 2730
  • submit to reddit

Update 2012-June-20: Please also read my follow-up post, Revisited: Your programming language sucks? 

I met someone recently that declared “Java sucks.” One proffered argument of that “suckiness” was Java’s lack of expressiveness. In point: you can’t compare two Date objects with the less or greater -than operators. Further, you can’t override the operators themselves. (I won’t touch that subject; we covered it in Computer Science 201.)

Date now = new Date();
Date epoch = new Date(0);
assert now > epoch; //won't compile

Nope, that won’t compile. What are we to do?

assert now.after(epoch);

There, that works. But what if we really, desperately wanted to use operators?

assert now.getTime() > epoch.getTime();

Both of these seem perfectly expressive to me. Much ado about nothing? I think it’s a matter of comfort and familiarity.

Saying a programming language “sucks” says less about the language and more about the person speaking.

 

 

 

 

 

 

Published at DZone with permission of Mike Christianson, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Erik Post replied on Sat, 2012/06/16 - 5:28am

Hi Mike,

I'm sure you'd agree that for whatever it is that you're trying to achieve by programming, Malbolge would suck. COBOL too, perhaps. Yes, that says something about you, but let's not pretend as though it's impossible to make qualitative assessments about programming languages, especially given a set of criteria. Who knows, your problem domain might be such that it would be wildly impractical not to have operator overloading. (For example, I've found it irritating that I couldn't use + on Java's BigIntegers. If you're doing a lot of matrix computations, syntax like MatLab's is nice.)

If the person you're referring to made his 'Java sucks' case based solely on the impossibility of comparing two Dates, especially without mentioning why this might be important to him, then yes, that might make for a somewhat feeble argument. (I mean, everybody knows how swell Java's Date API turned out, don't we?) That's not to say there aren't a lot of things wrong with Java, as there are with most programming languages. 

I personally don't have the things you mentions very high up on my list of reasons for not using Java, but I always find it instructive to learn about other people's criticisms. Surely you have your own list of Java peeves and secret wishes?

On a side note, I don't recall a CS class mentioning why operator overloading is bad. Perhaps you've had some problems with the C++ interpretation? The question of when to use it is quite a subjective (and orthogonal) one, as you hinted.

Cheers,
Erik 

Jonathan Fisher replied on Sat, 2012/06/16 - 9:56pm

COBOL is probably the most expressive language in existence:

DISPLAY "Enter student details using template below." 

ADD YEARS TO AGE 

 It's also can be faster than C/C++.

"Expressive" is a dumb argument. You need a level of it, but beyond a certain level it's pointless.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.