this post was submitted on 19 Jun 2025
92 points (84.3% liked)

Programmer Humor

24576 readers
633 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
 

Made with KolourPaint and screenshots from Kate (with the GitHub theme).

(page 3) 9 comments
sorted by: hot top controversial new old
[–] [email protected] 6 points 1 week ago (4 children)
load more comments (4 replies)
[–] [email protected] 2 points 1 week ago (3 children)

I've always wondered where all this 'let' business started

[–] [email protected] 4 points 1 week ago* (last edited 1 week ago) (2 children)

It's commonly used in math to declare variables so I assume programming languages borrowed it from there.

[–] [email protected] 0 points 1 week ago (1 children)

BASIC uses (used?) it to declare variables. (I don't know if earlier languages did.)

Not that that's a reason for other languages to copy it.

[–] [email protected] 0 points 1 week ago* (last edited 1 week ago) (5 children)

Doesn't Basic use Dim a As String?

load more comments (5 replies)
load more comments (1 replies)
load more comments (2 replies)
[–] [email protected] 7 points 1 week ago (5 children)

You're encoding more information in the typescript one. You're saying it's a string that will get updated.

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

You aren't though. In most languages that use the latter declaration you would prefix the declaration with final or const or the like to specify it won't be updated.

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

Yeah, it's explicitly distinct from const a: String which says it won't change, and var a: String, which means this is legacy code that needs fixing.

load more comments (3 replies)
[–] [email protected] 1 points 1 week ago (17 children)
load more comments (17 replies)
load more comments (2 replies)
load more comments
view more: ‹ prev next ›