but sometimes "๐๐ฝ".reverse() == "๐ฝ๐"
Programmer Humor
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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
"๐".reverse() == "๐"
Then we need reverseX and reverseY
"๐ฎ๐ช".reverse() = "๐จ๐ฎ"
Yet we live in a world where
"A".reverse() === "A"
"A".reverse() == "โ"
Where is your god now?!
File "", line 1
"๐".reverse() = "๐"
^
SyntaxError: cannot assign to function call
It is a font that changes ==
to one long equals sign.
Oh my bad, that idea didnโt cross my mind.
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'str' object has no attribute 'reverse'
What's with the lines of both equals symbols being combined together haha?
That's known as a ligature and they're pretty common in many programming-oriented fonts, which usually have stylistic sets with different ligatures for different programming languages that you can optionally enable in your editor's configuration. For example, here's the stylistic sets the Monaspace font offers:
Personally I'm not too fond of ligatures so I never enable any, but many folks do like them.
Edit: and just as a side note, ligatures are super common in many fonts, you just might not notice them. Here's some classic examples from the DejaVu Serif font, with and without a ligature: