• 0 Posts
  • 226 Comments
Joined 2 years ago
cake
Cake day: June 22nd, 2023

help-circle
  • masterspace@lemmy.catoProgrammer Humor@lemmy.mlEvil Ones
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    5 days ago

    Yes, it is:

    https://www.iso.org/standard/71616.html

    Page 3 of INTERNATIONAL STANDARD

    • ISO/IEC 21778 - Information technology — The JSON data interchange syntax

    8 Numbers A number is a sequence of decimal digits with no superfluous leading zero. It may have a preceding minus sign (U+002D). It may have a fractional part prefixed by a decimal point (U+002E). It may have an exponent, prefixed by e (U+0065) or E (U+0045) and optionally + (U+002B) or – (U+002D). The digits are the code points U+0030 through U+0039.



  • masterspace@lemmy.catoProgrammer Humor@lemmy.mlEvil Ones
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 days ago

    Because that object is of a type where that member may or may not exist. That is literally the exact same behaviour as Java or C#.

    If I cast or type check it to make sure it’s of type Bar rather than checking for the member explicitly it still works:

    And when I cast it to Foo it throws a compile time error, not a runtime error:

    I think your issues may just like in the semantics of how Type checking works in JavaScript / Typescript.






  • masterspace@lemmy.catoProgrammer Humor@lemmy.mlEvil Ones
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    4
    ·
    7 days ago

    K, well configure your linter the way a professional Typescript environment should have it configured, and it will be there too. Not to be rude but not having a linter configured and running is a pretty basic issue. If you configured your project with Vite or any other framework it would have this configured OOTB.


  • masterspace@lemmy.catoProgrammer Humor@lemmy.mlEvil Ones
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    2
    ·
    7 days ago

    Pretty much the only language that handles this worse is Python (and maybe Lua? I don’t really know much about Lua though).

    This is the case for literally all interpreted languages, and is an inherent part of them being interpreted.

    However, while I recognize that can happen, I’ve literally never come across it in my time working on Typescript. I’m not sure what third party libraries you’re relying on but the most popular OAuth libraries, ORMs, frontend component libraries, state management libraries, graphing libraries, etc. are all written in pure Typescript these days.


  • masterspace@lemmy.catoProgrammer Humor@lemmy.mlEvil Ones
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    18
    ·
    edit-2
    7 days ago

    Oh I’m sorry, I was waiting for you to name a more successful cross platform development language and framework?

    Oh, you’re listing Java, and Xamarin, and otherwise rewriting the same app 4 times? Cool beans bro. Great resourcing choices you’ve made.

    All filled with thousands of dependencies badly managed through npm to overcome the lack of a standard library actually useful for backend stuff.

    Bruh, this is the dumbest fucking complaint. “Open source language relies on open source packages, OMG WHAT?!?!!”

    Please do go ahead and show me the OOTB OAuth library that comes with your backend language of choice, or kindly stfu about everything you need being provided by the language and not by third party libraries.




  • masterspace@lemmy.catoProgrammer Humor@lemmy.mlEvil Ones
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    22
    ·
    edit-2
    7 days ago

    Honestly the meme of ‘JavaScript bad’ is so tired and outdated it’s ridiculous. It made sense 14 years ago before invention of Typescript and ES5/6+, but these days it basically just shows ignorance or the blind regurgitation of a decade old meme.

    Typescript is hands down the most pleasant language to work in, followed closely by the more modern compiled ones like Go, Swift, C#, and miles ahead of widely used legacy ones like Java, and PHP etc. and the white space, untyped, nightmare that is python.

    I’m like 99% sure that it’s just because JavaScript / Typescript is so common that for anyone who doesn’t start with it, it’s the second language they learn, and at that point they’re just whiny and butthurt about learning a new language.


  • masterspace@lemmy.catoProgrammer Humor@lemmy.mlEvil Ones
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    6
    ·
    7 days ago

    Lol name one outside of it’s well known equality rules that linters check for.

    Also, name the language you think is better.

    Because for those of us who have coded in languages that are actually bad, hearing people complain about triple equals signs for the millionth time seems pretty lame.