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

Programmer Humor

19315 readers
123 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 47 points 3 months ago* (last edited 3 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] 54 points 3 months ago (1 children)

Its javascript, itll just let you do that

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

it'll just let you do that

Pretty much sums up JavaScript's entire philosophy.

[–] jaybone 3 points 3 months ago

Let me just coalesce these types for you.

[–] [email protected] 14 points 3 months ago (1 children)
[–] jaybone 3 points 3 months ago
[–] hypertown 8 points 3 months ago
[–] 9point6 8 points 3 months ago (1 children)
[–] S0UPernova 4 points 3 months ago

Maybe...

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

Ackshually you don't need a type qualifier in C

[–] Static_Rocket 7 points 3 months ago* (last edited 3 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 3 months ago (1 children)
[–] [email protected] 4 points 3 months ago

Defaults to int if I'm not mistaken.

[–] jaybone 1 points 3 months ago