this post was submitted on 08 Dec 2023
622 points (96.4% liked)

Programmer Humor

32479 readers
240 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 15 points 11 months ago (3 children)

For the love of god, please do not use single-line alternatives to braced scopes. It's only tolerable in lambdas like Array.map( v => v**2 ). It's not for an implicit scope. It's for evaluating a return value.

But holy shit is it nice to have ?. in Javascript. It's such an anything-goes language until you look at it funny and it just shits the bed and silently dies. Hate hate haaate having to check if things exist, when so many other details fail politely and impact nothing. At least now it's one extra character instead of try-catch rigmarole.

[โ€“] [email protected] 1 points 11 months ago* (last edited 11 months ago)

Inb4 the JavaScript fanboys appear and argue a bad tool is fine if you're a genius, actually. Why aren't you a genius?

load more comments (2 replies)