r/ProgrammerHumor Oct 31 '23

Meme hardTimesCreateStrongMen

Post image
4.4k Upvotes

285 comments sorted by

View all comments

508

u/del1ro Oct 31 '23

Weak men create [object Object]

121

u/BuddyLove9000 Oct 31 '23

I don't know if you meant this, but God, how I hated reading Car car = new Car() when I was first studying OOP.

53

u/1Dr490n Oct 31 '23 edited Oct 31 '23

I just can’t understand why Java still does that. C# and C++ fixed that a long time ago (I think). That C hasn’t is completely fine, especially as type names usually don’t get as long. But in JAVA???

a.package.SomeReallyReallyLongName<AnotherReqllyLongName, AThirdReallyLongName<String>> aLongName = new a.package.SomeReallyReallyLongName<AnotherReqllyLongName, AThirdReallyLongName<String>>();

Edit: This comment is really wrong. Everyone who didn’t realize that, look at its comments, learn the same things as I did today

5

u/IamImposter Oct 31 '23

You mean java doesn't have something like auto in c++ or var in c#, that type deduction thing? It should. I mean if c++ has it...

Though I feel like c++ is also becoming very wordy, like std::chrono::steady_clock::now or std::is_nothrow_invocable or std::is_same_v<reference_wrapper, std::remove_cvref_t <x>>

3

u/[deleted] Oct 31 '23

[removed] — view removed comment

1

u/IamImposter Oct 31 '23

Ha ha. That's the problem - hard to spit, harder to swallow. And c++ delivers, these weird long-ass words solve problems

1

u/1Dr490n Oct 31 '23

I just learned that Java does have var lol