this post was submitted on 08 Jun 2025
403 points (97.4% liked)
Programmer Humor
36257 readers
1010 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
In Python you can use this as a variable name
In Python you can use ๐ as a variable name.
Edit: oops, guess I was mistaken, you can use most Unicode but emojis are not valid.
That actually seems even more arbitrary. Like, do they just hate fun?
you might be thinking of Rust.
Just going by the reputation, you probably can do this in JavaScript
C supremacy
The source character set is implementation defined.
You can use anything that doesn't start with a digit or punctuation as a variable name (underscore beginning also allowed) unless it's a keyword.
_ (sic) as a variable name is often used when a function returns multiple outputs but you only want one
Underscore alone is a special variable name and I'm pretty sure anything assigned to it goes straight to garbage collection. Whereas
_myvariable
is typically use to indicate a "private" class variable or method (Python doesn't have private so it's just a convention).