"This line at this character is giving me a syntax error... I'll just delete and rewrite it, maybe there's a stray whitespace. Oh, it runs now. Weird. Whatever."
The code editor I use would say something like syntax error ';', expected ';' and underline the character in red. That might lead to some head scratching as apparently the Greek character is literally the same, but with a different Unicode value.
15 Comments
rtxn@lemmy.world · 61 pts · 3y
How this plays out in reality:
"This line at this character is giving me a syntax error... I'll just delete and rewrite it, maybe there's a stray whitespace. Oh, it runs now. Weird. Whatever."
JollyTheRancher@lemmy.world · 21 pts · 3y
While I imagine this is typically true, I once spent a couple hours on something like this.
tdawg@lemmy.world · 5 pts · 3y
spoken like someone who hasn't been bitten by codepoints before
julianwgs@discuss.tchncs.de · 6 pts · 3y
Or you would spot the changed line in git immediately and revert it
perviouslyiner@lemm.ee · 14 pts · 3y
#DEFINE TRUE (__LINE__ % 100)
FirstWizardZorander@lemmy.world · 7 pts · 3y
The real Satan is always in the comments
pineapplelover@lemm.ee · 9 pts · 3y
You're fucking diabolical
bappity@lemmy.world · 6 pts · 3y
hi satan
Swedneck@discuss.tchncs.de · 4 pts · 3y
Don't languages generally tell you about potential look-alike characters specifically for this reason?
Monsieur@lemmy.world · 7 pts · 3y
The code editor I use would say something like syntax error ';', expected ';' and underline the character in red. That might lead to some head scratching as apparently the Greek character is literally the same, but with a different Unicode value.
Swedneck@discuss.tchncs.de · 2 pts · 3y
I'm talking about when you try to run/compile code, not in the editor.
Hello_there@kbin.social · 4 pts · 3y
Go make a bunch of improvements to someone's github
x4740N@lemmy.world · 2 pts · 2y
Should go and mess with that Google website drm thing if it's still active
SouthernCanadian@sh.itjust.works · 0 pts · 3y
I would just delete it since js is better without semicolons