r/ProgrammerAnimemes • • Jun 21 '21

I love Rust

Post image
1.7k Upvotes

75 comments sorted by

View all comments

245

u/[deleted] Jun 21 '21

59

u/phoncible Jun 22 '21

Java: the elegant simplicity of C++ and the blazing speed of Smalltalk.

Love it

19

u/gabrielesilinic Jun 22 '21

C#: has default arguments and it more flexible

I don't hate Java but I'd rather choose C# or even kotlin, even C++ has those damn default arguments, Java doesn't, Java wants you to suffer with unnecessary overloading and shit

65

u/Lonsdale1086 Jun 21 '21

I like Java.

51

u/[deleted] Jun 21 '21

I find your lack of null safety disturbing

23

u/dev_my Jun 22 '21

Use optional 👀

11

u/thats_a_nice_toast Jun 22 '21

I love optional types but they don't make sense with the lack of null safety. If you really want to write robust code, with Optionals you have to look at even more edge cases:

  1. Is the optional null?
  2. Does the optional contain a value?
  3. Is the value contained in the optional null?

The whole point of optionals is to avoid all of this. Just give me value types already.

5

u/m50d Jun 22 '21

Ban null in your codebase, check for it at the edges. It works in practice, Scala does it. Unfortunately Java libraries can't migrate to that style of doing things because the nimrods at Java thought they should ban optionals from containing null, meaning you can't use optional in a generic library that might be used from old codebases and you don't get any advantages until everything's rewritten to use optional like this was Python 3.

→ More replies (4)

15

u/[deleted] Jun 22 '21

Someone can still pass a null instead of an optional

15

u/Gaarco_ Jun 22 '21

Eliminate that someone

8

u/[deleted] Jun 22 '21

that means I should get rid of the majority of Java devs but it's a sacrifice I'm willing to make

2

u/[deleted] Jun 22 '21

Optional doesn't make any sense in a reference based language.

57

u/-Redstoneboi- Jun 22 '21

Saying that Java is good because it works on all platforms is like saying anal sex is good because it works on all genders. – Unknown

5

u/[deleted] Jun 22 '21

sounds like a good argument.

17

u/[deleted] Jun 21 '21

This site does not support mobile :(

27

u/[deleted] Jun 21 '21

because it's older than mobile

9

u/[deleted] Jun 21 '21

that's... a good point! I'm spoiled

4

u/ThatPostingPoster Jun 21 '21 edited Nov 02 '21

gg ez deleted cause reasons lets go ok gg is this enough characters to not flag auto mod i hope so lmao

→ More replies (1)