this post was submitted on 07 Dec 2023
882 points (100.0% liked)

196

16310 readers
2706 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] frobeniusnorm@lemmy.world 42 points 10 months ago* (last edited 10 months ago) (28 children)

Ruling Javascript and Python programmers out would be more sane imho. Java sucks, but at least its typed and doesn't implement weird semantics.

[–] anton@lemmy.blahaj.zone 18 points 10 months ago (25 children)

Had to work with a python programer on a small java project (in uni). I passed some (handcrafted) strings in an Optional to be explicit an first thing he does is check whether they are empty (sending on empty strings would not have been problematic). Also he had compilation errors on his branch that lasted over a week. What python does to someone.

[–] grue@lemmy.world 14 points 10 months ago (2 children)

That guy was shitty at Python, then. Python is all about EAFP instead of LBYL.

[–] lostme@lemmy.world 17 points 10 months ago (1 children)

Eat ass fast paced instead of lay back your lettuce?

[–] grue@lemmy.world 14 points 10 months ago

"Easier to Ask Forgiveness than Permission" vs. "Look Before You Leap."

In other words, in Python you should just write the code to do the thing and then put an exception handler at the bottom instead of cluttering up your function with guard code everywhere.

load more comments (22 replies)
load more comments (24 replies)