this post was submitted on 08 Jun 2025
466 points (97.6% liked)

Programmer Humor

36296 readers
1063 users here now

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

Rules:

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] pennomi@lemmy.world 8 points 21 hours ago* (last edited 21 hours ago) (4 children)

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.

[โ€“] CanadaPlus@lemmy.sdf.org 8 points 17 hours ago

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.

[โ€“] embed_me@programming.dev 10 points 20 hours ago (1 children)

Just going by the reputation, you probably can do this in JavaScript

[โ€“] scott@lemmy.org 3 points 18 hours ago
~ $ python
Python 3.12.10 (main, Apr  9 2025, 18:13:11) [Clang 18.0.3 (https://android.googlesource.com/toolchain/llvm-project d8003a456 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> โ— = 'nah'
  File "<stdin>", line 1
    โ— = 'nah'
    ^
SyntaxError: invalid character 'โ—' (U+2757)
>>>
~ $ node
Welcome to Node.js v23.11.1.
Type ".help" for more information.
> const ๐Ÿ‘ = 'test'
const ๐Ÿ‘ = 'test'
      ^

Uncaught SyntaxError: Invalid or unexpected token
>
[โ€“] QuazarOmega@lemy.lol 4 points 20 hours ago (1 children)
[โ€“] mkwt@lemmy.world 4 points 19 hours ago

The source character set is implementation defined.