Tomáš Petříček, 309 (3rd floor)
petricek@d3s.mff.cuni.cz
https://tomasp.net | @tomaspetricek
Lectures: Monday 12:20, S7
https://d3s.mff.cuni.cz/teaching/nprg075
Use types (1900s) to resolve logical paradoxes
\(p(x)\) true if and only if \(\neg x(x)\) But \(p(p)\) if and only if \(\neg p(p)\)
Predicate \(p\) can be only applied to entities of lower type hence \(p(p)\) is invalid
"Two types of variable are also permissible: fixed point and
floating point."
Called "modes" in more formal description!
Function arguments and results are in one of two modes.
Languages for business data processing
Built around working with data records
Clu and Ada in the 1970s
Type that can be used only through defined operations
Basis for abstraction, information hiding
and object-oriented programming
Not just adopting
logic ideas into programming
Are we even talking about the same thing?
Think cultures of programming!
Types used for checking
how memory is used
Fixed and floating point,
but also data structures
Types used for proving program properties
Simply typed lambda calculus and safety proofs
Types to support good engineering practices
Information hiding, editor tooling and documentation
Types as a mechanism
for team structuring
Division of labor, control programmer access rights
I call it my billion-dollar mistake. It was
the invention of the null reference in 1965.
I couldn't resist the temptation to put it in
because it was so easy to implement.
null
obj.foo()
on non-null types!Good language design case study!
Design inspired by logic, engineering concerns, existing real-world code
Mathematicians care for safety, engineering evaluation harder to do
Mathematics & engineering of types
Tomáš Petříček, 309 (3rd floor)
petricek@d3s.mff.cuni.cz
https://tomasp.net | @tomaspetricek
https://d3s.mff.cuni.cz/teaching/nprg075
Theory and proofs
Fancy types
History
Just for fun...