• Thorry84@feddit.nl
    link
    fedilink
    arrow-up
    30
    ·
    1 year ago

    Yes the compiler/interpreter can figure it out on the fly, that’s what we mean by untyped languages. And as stated both have their merits and their faults.

    Elon doesn’t know what the words mean and just chimes in with his AI future BS.

    • janAkali@lemmy.one
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      1 year ago

      Yes the compiler/interpreter can figure it out on the fly, that’s what we mean by untyped languages.

      Are there untyped languages? You probably meant ‘dynamically typed languages’.

      But even statically typed languages can figure out most types for you from the context - it’s called ‘type inference’.

      • nul@programming.dev
        link
        fedilink
        arrow-up
        16
        ·
        1 year ago

        Most of my code is untyped. First I type it, then I realize it’s all wrong and use backspace to untype it.

      • Traister101@lemmy.today
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        1 year ago

        Assembly probably? So low level you kinda just play with bits. That’s all I can think of for an untyped language. Everything else I’m aware of is dynamically or statically typed

      • Thorry84@feddit.nl
        link
        fedilink
        arrow-up
        0
        arrow-down
        1
        ·
        1 year ago

        Well that would depend on the definition and what you exactly mean by untyped.

        The untyped part is usually referring to the way the programmer interacts with the language, for example not setting a type for variables and parameters. But then there is the question of is the programmer ever allowed to explicitly set the type. And further more, if the programmer explicitly set the type, does this mean the type can’t change at a later point? And another question could be, can the programmer check or enforce what type a variable or parameter is? And the question, if there is only one type of data in the language, would that be a typed or untyped language? But I would consider these to be details and all fall under the untyped umbrella, with untyped just meaning not-typed.

        Then there’s the question of the technical implementation of the language. Defining a language is one thing, actually having it run on a real system is another. Usually technical systems at some point require explicit types. Something somewhere needs instructions on how to handle the data and this usually leads to some kind of typing instructions being added along with the data. But depending on how many abstraction layers there are, this can soon become a very pedantic discussion. I feel what matters is the design, definition and intend of a language. The actual technical implementation isn’t what matters in my opinion.

        I feel like there are so many programming languages and technical systems at this point, every variation and exception exists. And if you can think of one that doesn’t exist, expect a follow up comment of somebody pointing out it does exist after all, or them having started a project to make it exist in the near future.

      • jtk@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Might be able to call assembly untyped. Everything beyond that I think would be called either statically or dynamically typed, maybe weakly typed?