Show newer

Some notes on type theory 

Types are propositions/theorems in some logic that's paired with your language and values are proofs. I.e. a valid value X of type T is a proof that T is decidable and "true".

Computation is merely simplifying a proof.

Depending on a set of typing rules it is sometimes possible to produce different "correct by construction" values that wouldn't fuck you up. That's decidability.

The fancier your language is, the easier it is to present a value that's undecidable, uncomputable or otherwise FUBARd.

Propositions can be insidious when you try to convert between formal and informal intent. Consider what the stupidest value can satisfy your type while not doing any of the intended work (e.g. always returning empty list for "sort" function).

You need more fancier types to pin down exact details like "no, an empty list wouldn't fly, do the actual sorting, you ass".

Type inference is an epic win for programming. The fancier the types, the more difficult is inference.

Value inference (AKA proof search) is possible sometimes and is magic.

Those are basically the same with dependent typing. And it has its costs.

As they say, "a good type has half the value". This cuts both ways.

Extraordinary times call for extraordinary effort.
Most times are ordinary. Make an ordinary effort.

thezvi.wordpress.com/2017/09/3

Woke up with a strong urge to implement PID controller demo, with a touch of bezier.

Yo! I've decided to vacate mastodon.social to a less populous instance. If you're seeing this message then everything is okay 🌈✨

Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.