The Enchanted Tavern
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Sjmarf to Programmer Humor@programming.dev • 1 year ago

JavaScript

sh.itjust.works

message-square
112
fedilink
734

JavaScript

sh.itjust.works

Sjmarf to Programmer Humor@programming.dev • 1 year ago
message-square
112
fedilink
alert-triangle
You must log in or register to comment.
  • @morgunkorn@discuss.tchncs.de
    link
    fedilink
    138•1 year ago

    On the other hand, I don’t think you should add those ever

    • @RecluseRamble@lemmy.dbzer0.com
      link
      fedilink
      46•1 year ago

      Onfuscators probably use it though, so no spec ever will be able to get rid of this crap.

      • @Windex007@lemmy.world
        link
        fedilink
        16•1 year ago

        Can I vote for obsfuscators not holding a language hostage?

        • @intensely_human@lemm.ee
          link
          fedilink
          2•1 year ago

          Only if I can vote for sandwiches not falling apart when I eat them

        • @msage@programming.dev
          link
          fedilink
          7•1 year ago

          Best I can do is tie your pension to it.

    • Ethan
      link
      fedilink
      English
      52•1 year ago

      Sure. But in a sane language doing something totally nonsensical like that is an error, and in a statically typed language it’s a compiler error. It doesn’t just silently do weird shit.

      • @morgunkorn@discuss.tchncs.de
        link
        fedilink
        14•1 year ago

        Agreed! Unfortunately these maddening behaviors were kind of set in stone several decades ago, and it has been (correctly) decided “Don’t break the web”, these weird quirks are kept in modern interpreters/compilers.

        It’s actually quite interesting to read through the logic to follow when implementing an interpreter:

        https://262.ecma-international.org/13.0/#sec-object.prototype.tostring

      • @jcg@halubilo.social
        link
        fedilink
        1•1 year ago

        What’s a sane, dynamically typed language?

        • @leftzero@lemmynsfw.com
          link
          fedilink
          1•1 year ago

          Lisp?

        • Ethan
          link
          fedilink
          English
          3•11 months ago

          I was trying to make a point without starting a flamewar that was beside the point. Personally I’d never choose a dynamically typed language for a production system. That being said, Python and Ruby complain if you try to add an array, dict/hashmap, string, or number to another (of a different type) so they’re certainly more sane than JavaScript.

        • @Lime66@lemmy.world
          link
          fedilink
          1•11 months ago

          Any of them which are still strongly typed. Just because a language doesn’t check for type errors before runtime doesn’t mean it won’t check at all

      • @leftzero@lemmynsfw.com
        link
        fedilink
        4•
        edit-2
        1 year ago

        a sane language

        JavaScript

        Pick one.

        • Ethan
          link
          fedilink
          English
          1•
          edit-2
          11 months ago

          I thought it was clear I was saying JavaScript is not a sane language for this very reason

Programmer Humor@programming.dev

!programmer_humor@programming.dev
Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

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
  • 204 users / day
  • 600 users / week
  • 1.58K users / month
  • 4.08K users / 6 months
  • 1 subscriber
  • 1.45K Posts
  • 48.5K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • UI: unknown version
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org