this post was submitted on 11 Feb 2025
232 points (95.0% liked)

Programmer Humor

25726 readers
1199 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] 30p87@feddit.org 24 points 6 months ago (2 children)
[–] Kwdg@discuss.tchncs.de 26 points 6 months ago (1 children)

Not needed, main in C++ implicitly returns 0 if there is no return

[–] 30p87@feddit.org 0 points 6 months ago (1 children)

Should ≠ Needs to

You can do it, and it will work, but it's unclean and not best-practice. I wouldn't be surprised if it's undefined behaviour.

[–] xmunk@sh.itjust.works 23 points 6 months ago

Just to clarify. It is defined behavior - there's plenty of undefined behavior in C but that ain't one of them.

[–] syklemil@discuss.tchncs.de 19 points 6 months ago (3 children)

>What is C++? A miserable huge pile of "should"s

[–] shotgun_crab@lemmy.world 8 points 6 months ago

Love me some Castlevania++

[–] riodoro1@lemmy.world 1 points 6 months ago (2 children)

should have a space after „>” and two new lines after „?”.

I guess markdown is miserable as well.

[–] kboy101222@sh.itjust.works 5 points 6 months ago

Hey now, markdown serves it's purpose. It's not great, but as a web dev, I don't want people expecting full WYSIWYG editors in every website cause fuck that!

[–] xtools@programming.dev 3 points 6 months ago

not being able to master markdown might hint at why the commenter is struggling with C++

[–] 30p87@feddit.org 1 points 6 months ago* (last edited 6 months ago)

Still love it tho. You can make it whatever you want!