this post was submitted on 14 Jun 2024
493 points (95.6% liked)

Programmer Humor

19623 readers
2560 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 1 year ago
MODERATORS
 
top 38 comments
sorted by: hot top controversial new old
[–] [email protected] 49 points 5 months ago* (last edited 5 months ago) (5 children)

Missing type or identifier.

A const what?

Also, I read that you have to assign a const when it is declared. Something doesn’t feel right about this statement.

[–] [email protected] 55 points 5 months ago (1 children)

Its javascript, itll just let you do that

[–] [email protected] 40 points 5 months ago (2 children)

it'll just let you do that

Pretty much sums up JavaScript's entire philosophy.

[–] [email protected] 3 points 5 months ago

Let me just coalesce these types for you.

[–] [email protected] 14 points 5 months ago (1 children)
[–] [email protected] 3 points 5 months ago
[–] [email protected] 8 points 5 months ago
[–] [email protected] 8 points 5 months ago (1 children)
[–] [email protected] 4 points 5 months ago

Maybe...

const pain = Infinity
[–] [email protected] 6 points 5 months ago (3 children)

Ackshually you don't need a type qualifier in C

[–] [email protected] 7 points 5 months ago* (last edited 5 months ago)

Well, assuming you meant type specifier, at least not before C99. After that it is required. C23 explicitly states that a type specifier is required for all declarations.

If you actually meant type qualifier, then no. That was never required.

[–] [email protected] 3 points 5 months ago (1 children)
[–] [email protected] 4 points 5 months ago

Defaults to int if I'm not mistaken.

[–] [email protected] 1 points 5 months ago
[–] [email protected] 32 points 5 months ago (2 children)

Meanwhile in France: Lunch time!

[–] [email protected] 9 points 5 months ago (1 children)
[–] [email protected] 12 points 5 months ago (1 children)
[–] [email protected] 3 points 5 months ago

Baguette du fromage

[–] [email protected] 5 points 5 months ago

For mage in pain:

[–] jflorez 13 points 5 months ago (1 children)

If they move to Python they can just have pain without constant 😜

[–] [email protected] 4 points 5 months ago

And if they learned French instead, they had bread but this is not how it works. We don't always get what we want nor what we deserve

[–] [email protected] 12 points 5 months ago

The variable is not initialised.

[–] [email protected] 11 points 5 months ago (1 children)

Age or experience? Because both are funny

[–] [email protected] 1 points 5 months ago* (last edited 5 months ago)
[–] [email protected] 10 points 5 months ago

And pain is immutable

[–] [email protected] 7 points 5 months ago

For (life) { suffering; }

[–] ArbitraryValue 7 points 5 months ago (1 children)

I spent those years in dll hell.

[–] [email protected] 5 points 5 months ago

.so please, I use arch btw.

[–] [email protected] 5 points 5 months ago

bool theEnd;

[–] [email protected] 3 points 5 months ago

Is that a vaio?

[–] [email protected] 1 points 5 months ago
[–] [email protected] 1 points 4 months ago