Let's clarify a bit. You may think untyped language is a language which has no types (the name suggests it), but in reality, it is a language with the single type (it doesn't make sense to talk about types if there is only one). Examples of untyped languages: untyped lambda calculus (lambdas), assembly (bit strings). Most of the languages have types. Let's take, for example, ruby (which @ben
likes):
1+""Stringcan't be coerced into Integer
(repl):1:in `+'(repl):1:in`<main>'
This is nothing else than type error ¯\_(ツ)_/¯. So ruby is typed language, but there is no static type checker (at least not built in one, there is sorbet project which will be part of ruby 3).
What Ben meant to ask, I guess, is how dynamically type checked languages differ from statically type checked languages.
Let's clarify a bit. You may think untyped language is a language which has no types (the name suggests it), but in reality, it is a language with the single type (it doesn't make sense to talk about types if there is only one). Examples of untyped languages: untyped lambda calculus (lambdas), assembly (bit strings). Most of the languages have types. Let's take, for example, ruby (which @ben likes):
This is nothing else than type error
¯\_(ツ)_/¯
. So ruby is typed language, but there is no static type checker (at least not built in one, there is sorbet project which will be part of ruby 3).What Ben meant to ask, I guess, is how dynamically type checked languages differ from statically type checked languages.
More about terminology dev.to/stereobooster/pragmatic-typ...