612
submitted 1 month ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 94 points 1 month ago

Wouldn't most development programs tell them the syntax error on the line and column where you replaced the semicolon

This wouldn't work

[-] [email protected] 78 points 1 month ago* (last edited 1 month ago)

VSCode will add a yellow box around the character and tell you it's an uncommon glyph.

https://code.visualstudio.com/updates/v1_63#_unicode-highlighting

To note, this came about because it could be valid code and it's a security risk from copy/pasting malicious code. See:

https://certitude.consulting/blog/en/invisible-backdoor/

[-] [email protected] 41 points 1 month ago

Just tested in the console, it gives an illegal character error and gives you the line number.

[-] [email protected] 16 points 1 month ago

It would work for someone just starting and not knowing good tooling yet. However, the compiler should also tell you where to look and give you the area to look at as well. It'll be less clear than an IDE, though.

[-] [email protected] 3 points 1 month ago* (last edited 1 month ago)

Yeah, doing something similar with brackets would be much more effective since that usually doesn't give a line number. Is there a unicode clone of )?

[-] [email protected] 2 points 1 month ago

Yup. It's as if we're assuming this friend is coding inside Notepad.

this post was submitted on 12 May 2024
612 points (94.0% liked)

Memes

44066 readers
1780 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 5 years ago
MODERATORS