Have to add that we work exclusively in strongly-typed languages. Kinda want to see how it plays out, but I can’t help but argue with him, so I think I’ll just go.

  • vala@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    23 days ago

    What about the caller? IMO types are more helpful for the consumer of the code than the original developer.

    • Nalivai@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      23 days ago

      I worked as a subcontractor with a lead architect that used casting to void * as an only method of sending data. Argument to a function? Void *. Return value? Void *. Multithread pipe? Cast to a void *, no big deal. 80% of my job was investigating segfaults. 20% was heavy drinking to prevent suicidal thoughts.

      • ulterno@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        23 days ago

        I do mainly C and C++ and for a while, I had to check out some JS code…
        I wouldn’t want to take your place.

        The only case I remember using a void* in is when passing a function as an argument for a callback, to an RTC peripheral. Even then, the function was returning a void.

    • Hoimo@ani.socialOP
      link
      fedilink
      arrow-up
      1
      ·
      24 days ago

      Did you know that the type of a variable is determined by the frequency of plasma oscillations among the objects valence electrons?

    • Starfighter@discuss.tchncs.de
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      24 days ago

      The game “Deep Rock Galactic”

      Space dwarves (solo or co-op) mining in procedurally generated caves while getting bugged by the local fauna.

      There are a few different mission types, four unique classes and a vast weapon upgrade system to explore.

      Also features the best (non-voip) communication system ever.

      Highly recommend. Rock and Stone!

  • xmunk@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    24 days ago

    I recently tried out Python. I had no idea it still doesn’t have runtime enforced typing…

    I didn’t realize that PHP was decades ahead of it.

    • Pyro@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      24 days ago

      Python 3.x will never have static typing because that would break backwards compatibility.

      However, typing hints have been Integrated into Python for a while, and you are heavily recommended to use them, so your IDE can enforce typing.

      • xmunk@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        ·
        24 days ago

        Considering there is typing in the code why is there no switch to enable type checking at runtime? PHP does this with a per file declare(strict_types) - why would python be unable to have either a global or per file flag to enable checks?

        • Pyro@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          24 days ago

          Typing when you need it gives you more freedom over a toggle. You can choose to type some parts of the code while leaving other parts untyped.

          For example, if I’m writing a quick and simple Python script I may forgo typing, but when iterating on it I’d go back and add the types I need.