Comments

This profile is from a federated server and may be incomplete. Browse more on the original instance.

angel, to programmerhumor in Pure Evil

Automatic Semicolon Insertion (ASI) has (sadly) been a part of JavaScript longer than 2016. I’m not sure exactly when it was introduced, but this document from 2009 already contains it: web.archive.org/web/…/ELS5_Section_7.htm#Section_…

IMO it’s bad practice to rely on ASI since the semicolons may not get inserted where you expected them to. The following snippet


<span style="font-weight:bold;color:#a71d5d;">const </span><span style="color:#323232;">x </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#0086b3;">0
</span><span style="font-weight:bold;color:#a71d5d;">const </span><span style="color:#323232;">y </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">x
</span><span style="color:#323232;">[</span><span style="color:#0086b3;">1</span><span style="color:#323232;">, </span><span style="color:#0086b3;">2</span><span style="color:#323232;">, </span><span style="color:#0086b3;">3</span><span style="color:#323232;">].forEach(console.log) 
</span>

is interpreted as


<span style="font-weight:bold;color:#a71d5d;">const </span><span style="color:#323232;">x </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#0086b3;">0</span><span style="color:#323232;">;
</span><span style="font-weight:bold;color:#a71d5d;">const </span><span style="color:#323232;">y </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">x[</span><span style="color:#0086b3;">1</span><span style="color:#323232;">, </span><span style="color:#0086b3;">2</span><span style="color:#323232;">, </span><span style="color:#0086b3;">3</span><span style="color:#323232;">].forEach(console.log);
</span>

which raises a TypeError.

There are more examples of ASI not doing the right thing on the web, so I don’t agree with “Javascript doesn’t need semicolon”.

angel, to de_edv in 10 Jahre Let's Encrypt: 78 Prozent des Webverkehrs sind verschlüsselt

Ah, hatte früher auch eine Zeit lang ein StartSSL Cert. Dass die so shady waren und dass es sie mittlerweile gar nicht mehr gibt wusste ich nicht.

angel, to memes in Of course I know him, he's me

BTW a new episode has been released today

angel, to linuxmemes in GIMP (credit to mrAnmolv)

Sometimes it does take a few seconds for me as well, but not even close to a full minute. That must’ve been on an HDD, right?

angel, to linuxmemes in sudo touch grass

The explanation is most likely incorrect though. A more obvious cause of this error is that the current working is the root directory (/) and that they’re logged in as a non-root user, thus trying to create the file /woman without sufficient permissions.

angel, to programmerhumor in bad gateway

nginx 0.7 😵

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • KamenRider
  • Ask_kbincafe
  • TheResearchGuardian
  • KbinCafe
  • Socialism
  • oklahoma
  • SuperSentai
  • feritale
  • All magazines