The Bard's Lemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Sjmarf@sh.itjust.works to Programmer Humor@programming.dev · 2 years ago

JavaScript

sh.itjust.works

message-square
58
link
fedilink
578

JavaScript

sh.itjust.works

Sjmarf@sh.itjust.works to Programmer Humor@programming.dev · 2 years ago
message-square
58
link
fedilink
  • Ethan@programming.dev
    link
    fedilink
    English
    arrow-up
    41
    ·
    2 years 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
      arrow-up
      13
      arrow-down
      1
      ·
      2 years 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

    • leftzero@lemmynsfw.com
      link
      fedilink
      arrow-up
      3
      ·
      2 years ago

      a sane language

      JavaScript

      Pick one.

      • Ethan@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 years 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

Subscribe from Remote Instance

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
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 830 users / day
  • 1.15K users / week
  • 4.31K users / month
  • 9.24K users / 6 months
  • 1 local subscriber
  • 31.9K subscribers
  • 1.68K Posts
  • 29.9K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.14
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org