EDIT
There have already been several people asking the same things in the comments so I’m going to write here the answers for anyone going to ask the same things again:
- Where have you read that JavaScript is untyped?. Scroll up a bit. As I say in the post, Brendan Eich (creator of JS) uses that word to describe JS, in the SO discussion linked above there people saying the same thing, tech-influencers I don’t want to promote do so too and finally some users in the comment section.
- There are no untyped languages, that makes no sense. Using the description of untyped languages as languages without a type system (a definition used by authors like L. Cardelli or R. Harper very different from dynamically or weakly typed), untyped languages do exist.
- A lot of Turing complete formal languages are untyped, from the Turing machines themselves to cellular automata.
- Assembly languages are untyped. Some may provide syntax sugar to work with primitive typed-like values, but there is not a type system that imposes restrictions on operations based on types (in most of them).
- Some shell languages are untyped. The type-like restrictions come from subprocesses, not from a native type system.
- Pure Prolog is untyped. Without the IO stream entities, everything is a Horn clause that can be evaluated to true or false, without type restrictions.
- Some esoteric languages are untyped. Brainf*ck being the most popular, lots of languages, usually minimalistic, don’t have a type system.
Yes, I know typed languages are more present in the industry (except for assembly and shell languages), but that doesn’t make the distinction pointless. Remember the software industry came way much later than computer science itself and both still develop in separate streams.
- That’s not how type systems work. If you read the thread in the comments with @DarkWiiPlayer, you’ll find that there doesn’t seem to be a consensus on whether types are syntactic or semantic information, so depending on the sources you use, all this will make sense or not. The paradigm I’m adjusting to is that types are semantic information, not syntactic. It’s a complex topic so instead of elaborating further I’ll link some references.
- L. Cardelli & P. Wegner (1985) On Understanding Types, Data Abstraction, and Polymorphism (PDF)
- R. Harper (2016) Practical Foundations for Programming Languages (2nd ed.) (PDF)
- Is type-checking “syntactic” or “semantic”? Computer Science Stack Exchange (link)
To be fair with the opposite paradigm, here’s their reference too.
- H. Geuvers (2019) Introduction to type theory (PDF)
Thank you to all those who have participated in the comments!