4 ms·
Those terms have actual meaning, I've never heard Python or Ruby referred to as untyped. Because they both definitely have types and are in fact strongly typed
by dismalaf 2y ago
Those terms have actual meaning, I've never heard Python or Ruby referred to as untyped. Because they both definitely have types and are in fact strongly typed.
Like, no one would call Ocaml untyped if you used type inference and didn't spell them out yourself... Or if you used the auto keyword everywhere in C++... The Ruby and Python runtimes both definitely enforce types.
- IshKebab 2y ago> I've never heard Python or Ruby referred to as untyped Well, now you have! Here are some examples: https://0xda.de/blog/2024/03/untyped-python-sucks/ https://0xda.de/blog/2024/03/untyped-python-sucks/ https://lucumr.pocoo.org/2023/12/1/the-python-that-was/ https://lucumr.pocoo.org/2023/12/1/the-python-that-was/ In fairness I think it is a fairly recent linguistic shift, probably because there's no debate between weakly typed and strongly typed - strongly typed is oblivious the right answer. Instead the debate is between dynamically-typed-without-static-type-annotations and statically-typed-or-dynamically-typed-with-static-type-annotations, but obviously people need a more succinct term for that. > Like, no one would call Ocaml untyped if you used type inference and didn't spell them out yourself... Or if you used the auto keyword everywhere in C++... The Ruby and Python runtimes both definitely enforce types. Static type inference still counts as having static types. That's totally different to dynamic typing without static type annotations ("untyped").
- dismalaf 2y agoOf course it's Python people who come up with this nonsense...
- IshKebab 2y agoDo you have a better name suggestion?
- Izkata 2y agoThey said it in their first comment: dynamic typing
- IshKebab 2y agoNot a good option - then you'll get a whole different set of pedants saying that Python is always dynamically typed, which I think is a lot more reasonable than quibbling over the use of "untyped" to describe Forth.
- dismalaf 2y agoAdding type annotations doesn't make Python statically typed. Type annotations are borderline meaningless, they're basically just a type of documentation that helps your tools spit out better suggestions and makes your tools yell at junior developers. Python isn't taking advantage of type annotations to produce better compiled code or anything, it's still a dynamic language that infers types at runtime.
- IshKebab 2y agoYeah that's exactly what I was saying. So what word would you use to mean "dynamically typed without static type annotations"? > your tools yell at junior developers. Oh you're one of those...
- dismalaf 2y ago> one of those... If by one of those you mean a solopreneur who doesn't have any junior devs to yell at then yes. If I wanted to use static types I'd use an actual statically typed language with all of the performance benefits (Go, Java, Rust, Haskell, Ocaml, etc...). Using a dynamically typed/interpreted language with type annotations is literally the worst of all worlds...