this post was submitted on 11 Dec 2023
1161 points (98.9% liked)

Programmer Humor

32435 readers
334 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
[–] tetris11@lemmy.ml 5 points 11 months ago (2 children)

Just once I want '1' + '2' to equal '3'. Is that so much to ask?

[–] Metype@lemmy.world 7 points 11 months ago (1 children)

You want to remove the string concatenation operator? Cause that'll do it

[–] tetris11@lemmy.ml 9 points 11 months ago (1 children)

I think every language needs a please operator, which acts to enforce human expectation of a statement:

'1'  + '1'            ## evaluates to '11'
please '1' + '1' ## evaluates to '2'
[–] PlexSheep@feddit.de 4 points 11 months ago

I kinda like that

[–] wewbull@feddit.uk 5 points 11 months ago

Yes. Yes it is.