this post was submitted on 29 Aug 2023
62 points (71.5% liked)

Programmer Humor

32710 readers
98 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
top 13 comments
sorted by: hot top controversial new old
[–] [email protected] 43 points 1 year ago (2 children)

Undefined property : lenght

[–] [email protected] 4 points 1 year ago

Syntax error: expected >

[–] [email protected] 2 points 1 year ago

Yeah 💀 the for loop won't run then

[–] [email protected] 22 points 1 year ago

Syntax error: ? is not a valid operator

[–] [email protected] 20 points 1 year ago (1 children)
[–] [email protected] 41 points 1 year ago (1 children)
[–] [email protected] 13 points 1 year ago

Speak for yourself

[–] Vigge93 4 points 1 year ago (1 children)

for(int i = 1; i > 0; i++)

[–] lemmy_see 2 points 1 year ago* (last edited 1 year ago) (1 children)

-8 bytes

for (int i=1;;i++)

[–] Vigge93 1 points 1 year ago (1 children)

Not quite the same, there's a subtle but significant difference

[–] lemmy_see 1 points 1 year ago (1 children)
[–] Vigge93 2 points 1 year ago

What happens on the next iteration when i = 2,147,483,647 for each of our loops?

[–] fubo 1 points 1 year ago