Before C++, I never thought about the cost of values carrying their type. C++ gives you the choice with optional Run-Time Type Information.
miniblog.
Related Posts
Today in cursed C code:
void foo(int32_t int32_t, int32_t bar);
Since C puts identifiers and typedefs in the same namespace, this code just produces a confusing compile error about the type of bar!
(This occurred in some real code after macro expansion.)
I'm surprised there aren't more interpreted languages with a first party type checker.
Python has several good type checkers, Ruby has Sorbet, and there are others.
Having zero compilation time *and* a full IDE seems like such a compelling design, at least on paper.
Language design question: what type should `while True {}` have?
Bottom: It doesn't contain any `break` statements.
Unit: Treat loops with/without `break` consistently.
I already have lints that warn on unreachable code after diverging loops, so the Unit case feels surprising.