• 0 Posts
  • 12 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle


  • "1" + 2 === "12" is not unique to JS (sans the requirement for the third equals sign), it’s a common feature of multiple strongly typed languages. imho it’s fine.

    EDIT: I did some testing:

    What it works in:

    • JS
    • TS
    • Java
    • C#
    • C++
    • Kotlin
    • Groovy
    • Scala
    • PowerShell

    What produces a number, instead of a string:

    • PHP
    • SQL
    • Perl
    • VB
    • Lua

    What it doesn’t work in:

    • R
    • C
    • Go
    • Swift
    • Rust
    • Python
    • Pascal
    • Ruby
    • Objective C
    • Julia
    • Fortran
    • Ada
    • Dart
    • D
    • Elixir

    And MATLAB appears to produce 51, wtf idk





  • Usually they’re building the website with browserlist and polyfills, and they specify how old a browser they wish to support, usually by analysing percentages of public usage, or they allow types only supported in newer browsers. Meaning if they use a feature only available in newer browsers, then it won’t be automatically backported to support older browsers.

    But that’s only if they actually use those features, they’re just available to them. And it’ll only break in those places they do use them, which could be quite little of the site.

    So often it’s just “we can’t guarantee it’ll work in your old browser and enough of our users use newer browsers that we’ll block you and not care”.





  • guy@lemmy.worldtogrimdank@lemmy.worldBlessed heat
    link
    fedilink
    English
    arrow-up
    34
    ·
    7 months ago

    Like my oven clock. Six buttons with cryptic symbols on them. You can press them, push them and hold multiple buttons together and it does different things with different equally cryptic symbols appearing on the LCD. Sometimes somebody accidently pushes a button and it gets stuck in a weird state where it refuses to cook. At least I’ve worked out the correct key combo to set the current time