• Brickardo@feddit.nl
    link
    fedilink
    arrow-up
    9
    ·
    5 months ago

    Why, of all possible languages, would you suggest this for Javascript where semicolons are not mandatory

    • ulkesh@beehaw.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      5 months ago

      Not only that, the interpreter will point directly to the line of code and possibly to the exact character that is the problem. Any programmer worth anything would find the issue or, worst case, retype the line of code and have the problem fixed rather quickly. “Illegal character” is a pretty easy error to diagnose.

      But…I still chuckled a little at the intent of the joke. I’m sure there are better pranks one could come up with, though.

    • notthebees@reddthat.com
      link
      fedilink
      arrow-up
      3
      ·
      5 months ago

      I had a friend who was a compsci minor who did almost the entirety of said minor on a really old chromebook. They did everything on a basic text editor. You would be surprised

  • x4740N@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    5 months 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

  • dlok@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    5 months ago

    Wanted to use this to prank a colleague but SQL server accepts that as well lol

    • Zerush@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      5 months ago

      What? Remapping your keyboard? Well, there are worst jokes, I still remember that time when the first PCs appeared and you could try them in shopping centers. They quickly stopped doing this, because some went into the BIOS and disabled the keyboard or worse, the screen. Good ol’ times 😏

  • Passerby6497@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    5 months ago

    Meanwhile in VS Code: hey, I see this Unicode symbol that’s confused for this expected symbol, would you like to replace it?

  • phorq@lemmy.ml
    link
    fedilink
    Español
    arrow-up
    1
    ·
    5 months ago

    Even better would be to remap their keyboard’s semicolon key to that symbol

  • fubarx@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    5 months ago

    MSVC supports unicode. In C or C++, you could try:

    #define ; ;

    Second one is the greek semicolon but the client I’m using may strip it out. I’m too lazy to try.