A Primer on Type Systems
31–35 of 35 posts
Re: A Primer on Type Systems
#32> There does not seem to be any equivalent of the notion of soundness in the world of dynamic typing. However, we can still talk about whether a dynamic type system strictly enforces type safety. My understanding is that there are well understood definitions of soundness for dynamically typed languages. The soundness theorem will generally be weaker ("your program will evaluate to a value or abort on a type confusion…
The correct analogy is to a segfault, meaning the program exited abnormally because it's inconsistent in an important way. It's the reason statically typed languages are faster than dynamically languages: expressions have a fixed meaning than enables optimisation guarantees you can depend on.
Re: A Primer on Type Systems
#33Earlier quoted context omitted.
Snigl [0] has statically typed function signatures, struct fields, bindings etc; but values still carry their type. It also traces code before running it to eliminate as many type checks as possible. The categories aren't very helpful from my perspective, same goes for compiler vs. interpreter. All it leads to is endless arguing about definitions and discouraging of novel approaches. [0] https://gitlab.com/sifoo/snig…
I agree, and I don't think this is a bad trend, once upon a time I think static vs. dynamic was a clear distinction, that distinction is being worn down as we learn more about the value and costs of those approaches - and as that happens we're compromising the approaches to gain more of the value. In PHP the (mostly ) JIT interpretation exposed a weakness where infrequently executed pieces of code were harder to have…
I think there's still a very clear distinction, but there's often value in having access to both in one language. The dynamic typing features can often make up for limitations of your type system, for instance.
Re: A Primer on Type Systems
#34In sense templates are similar to dynamic languages. Except in C++ it is the compiler, not runtime, that evaluates the templates.
Re: A Primer on Type Systems
#35https://www.destroyallsoftware.com/talks/useing-youre-types-...