Hacker News new | ask | show | jobs
by mikelevins 992 days ago
Imagine working on a networked system that uses types to make it impossible to express operations that violate data security and integrity constraints, and where such constraints control whether data is allowed to be read or written from or to a given endpoint. Imagine further that the types governing permission to read or write depend on environmental state that can change at any time--for example, as soon as a specific person changes roles, the set of ports they are allowed to read and write changes.

The type system enforces those permissions: writing to an impermissible destination is a type error. The types applicable to an entity are not necessarily knowable at compile time; some of them might change at any time.

I had a job working on such a system. It supported a type system implemented in Haskell with both static and dynamic type disciplines, where values were tagged with base types designed to be checked dynamically in hardware.

Was the programming language dynamically typed? Yes. Was the programming language statically typed? Yes.