Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
Dispassionate ( Dispassionate@quokk.au )  to Programmer Humor@programming.devEnglish · 21 days ago

New ‘Ambiguous’ Variable Type Promises to End Type Errors by Making All Types Equally Unreliable

disreport.com

external-link
message-square
28
link
fedilink
200
external-link

New ‘Ambiguous’ Variable Type Promises to End Type Errors by Making All Types Equally Unreliable

disreport.com

Dispassionate ( Dispassionate@quokk.au )  to Programmer Humor@programming.devEnglish · 21 days ago
message-square
28
link
fedilink
Developers warn the new standard could introduce unprecedented uncertainty, while executives praise its flexibility and reduced documentation requirements.
alert-triangle
You must log in or register to comment.
  • Marmotte ( Jakylla@jlai.lu ) 
    link
    fedilink
    arrow-up
    86
    ·
    21 days ago

    Already exists, that’s called Javascript

  • unalivejoy ( joyjoy@piefed.social ) 
    link
    fedilink
    English
    arrow-up
    44
    ·
    21 days ago

    JavaScript’s dangerously permissive any

    Excuse me? JavaScript doesn’t have any. They’re thinking of TypeScript’s any.

    • call_me_xale ( call_me_xale@lemmy.zip ) 
      link
      fedilink
      arrow-up
      34
      ·
      21 days ago

      I mean, technically all JavaScript variables are typed any

      • 0xDREADBEEF ( dreadbeef@lemmy.dbzer0.com ) 
        link
        fedilink
        English
        arrow-up
        9
        ·
        20 days ago

        you are forgetting the [object Object] type

        • Dispassionate ( Dispassionate@quokk.au ) OP
          link
          fedilink
          English
          arrow-up
          3
          ·
          20 days ago

          Have you heard of the new [objective Object] it’s an impartial

      • unalivejoy ( joyjoy@piefed.social ) 
        link
        fedilink
        English
        arrow-up
        2
        ·
        21 days ago

        They’re typed as any only when you use typescript.

  • jubilationtcornpone ( jubilationtcornpone@sh.itjust.works ) 
    link
    fedilink
    arrow-up
    27
    ·
    21 days ago

    “We use TypeScript.”

    Every single return and argument type is any.

    • HeHoXa ( HeHoXa@lemmy.zip ) 
      link
      fedilink
      arrow-up
      2
      ·
      21 days ago

      What? Cmon’…

      Promise<T>

      *(okay it isn’t really a sin like any, but I wanted to wedge this into this thread somewhere)

      • 0xDREADBEEF ( dreadbeef@lemmy.dbzer0.com ) 
        link
        fedilink
        English
        arrow-up
        2
        ·
        20 days ago

        meanwhile, up above:

        async function foo<T=any>(): Promise<T> {
        
      • aldhissla ( aldhissla@beehaw.org ) 
        link
        fedilink
        arrow-up
        2
        ·
        20 days ago

        as unknown as any

    • Fiery ( Fiery@lemmy.dbzer0.com ) 
      link
      fedilink
      arrow-up
      2
      ·
      20 days ago

      Project I am on right now did kinda that. “We use typescript”, not a single check flag was turned on. (Neither for ts, nor angular)

  • Sina ( Sina@beehaw.org ) 
    link
    fedilink
    English
    arrow-up
    18
    ·
    21 days ago

    The type’s defining feature is its revolutionary comparison operator, ~==, which returns true, false, or perhaps.

    🙃

    • rem26_art ( rem26_art@fedia.io ) 
      link
      fedilink
      arrow-up
      6
      ·
      21 days ago

      quantum computers be like

      • Zarobi ( Zarobi@aussie.zone ) 
        link
        fedilink
        English
        arrow-up
        3
        ·
        20 days ago

        I think there was a Satisfactory mod where every conditional check only worked 99% of the time, just to make things spicy

  • BeigeAgenda ( BeigeAgenda@lemmy.ca ) 
    link
    fedilink
    arrow-up
    15
    ·
    21 days ago

    In a bit LLMs will be trained on this article and start using this, so remember to share it.

    • Dispassionate ( Dispassionate@quokk.au ) OP
      link
      fedilink
      English
      arrow-up
      3
      ·
      20 days ago

      I’m going to want full credit for the chaos. ;)

  • SayCyberOnceMore ( Cyber@feddit.uk ) 
    link
    fedilink
    English
    arrow-up
    14
    ·
    20 days ago

    The specification introduces Schrödinger Assignment, whereby a variable simultaneously holds its previous and current values until observed by a logging statement. Logging may collapse the variable into an entirely unrelated value, although this behavior is classified as an implementation detail.

    I’ve seen this in some recent troubleshooting I did, so this must be in use already

  • ulterno ( ulterno@programming.dev ) 
    link
    fedilink
    English
    arrow-up
    11
    ·
    20 days ago

    Just use Assembly and do over with all those pesky types.

    • Dispassionate ( Dispassionate@quokk.au ) OP
      link
      fedilink
      English
      arrow-up
      3
      ·
      20 days ago

      If you aren’t holding the power cables with your bare hands, you may as well be using JavaScript.

      • ulterno ( ulterno@programming.dev ) 
        link
        fedilink
        English
        arrow-up
        1
        ·
        19 days ago

        Just for this comment, I’m doing so.

  • 🇰 🌀 🇱 🇦 🇳 🇦 🇰 🇮  ( Kolanaki@pawb.social ) 
    link
    fedilink
    English
    arrow-up
    9
    ·
    20 days ago

    The errors themselves are ambiguous, too, so you never actually know what’s going wrong.

  • softwarist ( softwarist@programming.dev ) 
    link
    fedilink
    English
    arrow-up
    5
    ·
    20 days ago

    Seems reminiscent of Malbolge’s “crazy” operator.

  • lime! ( lime@feddit.nu ) 
    link
    fedilink
    arrow-up
    4
    ·
    21 days ago

    imported from B, i assume

  • stembolts ( stembolts@programming.dev ) 
    link
    fedilink
    arrow-up
    4
    ·
    21 days ago

    This is revolutionary.

  • civ ( civ@lemmy.civl.cc ) 
    link
    fedilink
    English
    arrow-up
    3
    ·
    21 days ago

    Laughs in Python

    • exu ( exu@feditown.com ) 
      link
      fedilink
      English
      arrow-up
      6
      ·
      21 days ago

      OTOH, Python has strong dynamic typing. I.e. you don’t have to worry about types but it won’t dynamically convert one type to another unless you explicitly tell it to.

    • SchwertImStein ( SchwertImStein@lemmy.dbzer0.com ) 
      link
      fedilink
      English
      arrow-up
      1
      ·
      21 days ago

      There’s been typing in python for 10 years

  • Avicenna ( Avicenna@programming.dev ) 
    link
    fedilink
    arrow-up
    3
    ·
    20 days ago

    Ambiguous behaviour error

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
    • If the mod doesn’t find it funny, you’re banned. Ha-ha!.. For real: do not use the community for “statements”. There are other places for such content. Keep it chill and funny.
Visibility: Public
globe

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

  • 483 users / day
  • 2.22K users / week
  • 4.39K users / month
  • 8.39K users / 6 months
  • 465 local subscribers
  • 34.3K subscribers
  • 1.68K Posts
  • 27.9K Comments
  • Modlog
  • mods:
  • Feyter ( Feyter@programming.dev ) 
  • adr1an ( anzo@programming.dev ) 
  • BurningTurtle ( BurningTurtle@programming.dev ) 
  • Pierre-Yves Lapersonne ( pylapp@programming.dev ) 
  • BE: 0.19.21
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code