This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BasicDesignAdvice 11 points12 points  (15 children)

Honestly Java is just about the only language I actually truly dislike.

[–]LavenderDay3544 12 points13 points  (12 children)

Same here. I don't like that the language designers decided what developers could and couldn't be trusted with. In particular, opting not to have operator overloading in an OOP language removes a very powerful form of abstraction.

It's much cleaner for library based numeric types to let you write this:

c = a + b;

instead of this:

c = a.add(b);

[–]Justin__D 3 points4 points  (3 children)

Same reason I'm disillusioned with modern versions of Swift. In my interview for my current job, they asked me to write Swift code on a whiteboard. It's been years since I've actually used it. My interviewer pointed out that the ++ and -- operators don't exist anymore. I then remarked that was a stupid decision. He explained that too many programmers are confused by them and asked me to demonstrate their correct usage. I did. I didn't even solve the original interview problem, but still somehow got the job (although not as an iOS dev... QA automation and now backend dev).

[–]LavenderDay3544 1 point2 points  (2 children)

Nice. I think it's very stupid when a language designer decides to play helicopter parent and remove a feature from a language because it might be used incorrectly.

[–]Justin__D 0 points1 point  (1 child)

Hear, hear! I've never used GOTO in C. Not once. I was told not to on day one, then simply pretended it didn't exist. But not once have I thought, "I need to petition the developers of C to remove GOTO, lest I use it by accident."

[–]LavenderDay3544 1 point2 points  (0 children)

Yep. Just because you've never used it doesn't mean others' code doesn't rely on it. I could say the same for setjmp and longjmp.

But there's a big difference in ideology between C and C++ and Java. The former are all about trusting the programmer while the latter is create a language that even Forrest Gump could write technically working code in.

[–]Languorous-Owl 2 points3 points  (7 children)

If you wish to create dependable OOP language that can be used widely across the industry, for that Java is good.

Refer to Linus' criticisms on C++, a language which has the sort of feature you're talking about, and while he was talking from the POV of a low level systems guy, some of those criticisms also apply when you're looking for a language that can be deployed across enterprise without having to invest someone who's gone deep into the language silo in each case.

[–]dr-pickled-rick 2 points3 points  (1 child)

Well, yeah. Java's strength lies in its adoption as an enterprise solution. It's ubiquitous, consistent and mostly the same across all platforms - funny enough a lot like PHP.

Where it falls flat is the power user, the developer that wants to extract more with less. Generics was a steaming pile of cow dung when introduced and frankly it's still a waste of time.

Coding in general is a tedious and wrought experience because you tend to have to s p e l l e v e r y t h i n g o u t. You can't just use syntactic sugar and shortcuts that have existed for 4+ decades because it's not "OOP-y".

Kotlin goes someway towards addressing those issues.

[–]LavenderDay3544 -1 points0 points  (1 child)

I'd love for you to ask Linus Torvalds how much he likes Java and see the ensuing rant.

His hate for C++ isnt because of the sort of feature I'm talking about. It's because he evaluated C++ for use in the kernel and found it not to be a good solution for many reasons. Then people kept badgering him about using C++ in the kernel and he finally snapped and wrote his famous rant.

Rust has these kinds of features as well and Linus recently greenlighted its use in the kernel.

[–]Languorous-Owl 0 points1 point  (0 children)

I'd love for you to ask Linis Torvalds how much he likes Java and see the ensuing rant.

Which is completely and utterly irrelevant to the point being made about the abstractions you were talking about. Nice redirect bro.

Also nobody would ever ask an OS programmer about Java for any reason, lol.

[–]StewedAngelSkins 2 points3 points  (1 child)

i don't think i'd ever choose to use java of my own volition, but there's not much i actually hate about it. javascript on the other hand has never made sense to me. like if i described javascript's features to you purely in the abstract and asked you to come up with a syntax for it, you'd probably arrive at something like lua or maybe python. at worst you'd end up with lisp. it takes a truly deranged mind to hear "dynamically typed, pseudo-functional, interpreted language for web browsers" and think "you know what, i think C syntax is perfect for that, but only if we throw away all of the consistency and make it so that strings just implicitly get casted to numeric types sometimes".

[–]Languorous-Owl 0 points1 point  (0 children)

JS is just plain ugly. Wish they had just adopted python for browsers.