Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Java saved me from having a C++ career. And that was the 90s C++, not the C++ of today. I dodged a bullet there.


Unfortunately I learned Delphi

Afterwards you could not take the other languages seriously

Like comparing two strings for equaltiy, strA and strB.

In Delphi, you write: strA = strB

In Java: strA != null && strA.equals(strB)

Delphi just did everything better


I tried to learn Delphi on an existing Delphi project.

My experience was one of hunting dependencies in bookshelves, file serves, (defunct) vendor web sites and also source forge.

That was the point were I grokked the immense value of Maven.


Java was designed when C and C++ were still going strong and there was a feeling (or fear, depending on who you asked) that C++ would be as omnipresent as C was.

Java tried very hard to fix the perceived errors of C++ and operator overloading was high on that list.

Nowadays, we are no longer afraid of operator overloading so I kind of wonder why it hasn't found its way into modern Java.


But they fixed the wrong "errors"

C++ is actually a good language. But everything that comes from C is bad.


There's a very good language in C++ trying to get out.

The problem is that different people consider different subsets of C++ as good.


C++: has generics, inheritance, pointers, macros, const, function overloading, and exceptions

Sun: C++ is too complicated. We need to simplify it by removing generics, pointers, macros, and const

Google: C++ is too complicated. We need to simplify it by removing generics, inheritance, pointers, macros, const, function overloading, and exceptions

Mozilla: C++ is too complicated. We need to simplify it by removing inheritance, function overloading and exceptions


You are ignoring that every one of that languages you're describing here have not only removed stuff but also implemented stuff differently.

Also, Sun said "manual memory management is dangerous" and history proved them right (granted, they were not the first to say so). Java also proved that a VM based language can be competitive performancewise with a compiled language. It influenced the design of PL down the lines.

Go, well I'm not the biggest fan of its design philosophy but I'm still would have chosen Go over C++ in the 90s if both were available back then.

Rust goes well beyond anything C++ has done. C++ failed in replacing C but Rust might be able to pull that off. Considering that we still have lots of the buffer overflows in 2021 I'd say it's about time.

> C++: has generics, inheritance, pointers, macros, const, function overloading, and exceptions

Pointers. Plural. That's a good point. C++ likes pointers, so much it has raw pointers, references, std::auto_ptr, std::unique_ptr and std::shared_ptr.

C++ also has a shitton of other functionality without a coherent design. In that regard, even C is better. They also almost never remove anything. That std::auto_ptr is up for removal just shows how bad it was and that it shouldn't have been added in the first place.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: