An effect system proposal for C2y(open-std.org) In this discussion proposal we suggest that C would be improved by extending the core type system into a type and effect system, that forces functions and blocks to declare which classes of effects will result from their evaluation.
What would it take to add refinement types to Rust?(yoric.github.io) A few years ago, on a whim, I wrote YAIOUOM. YAOIOUM was a static analyzer for Rust that checked that the code was using units of measures correctly, e.g. a distance in meters is not a distance in centimeters, dividing meters by seconds gave you a value in m / s (aka m * s^-1).
What would it take to add refinement types to Rust?(yoric.github.io) A few years ago, on a whim, I wrote YAIOUOM. YAOIOUM was a static analyzer for Rust that checked that the code was using units of measures correctly, e.g. a distance in meters is not a distance in centimeters, dividing meters by seconds gave you a value in m / s (aka m * s^-1).
211 points by surprisetalk 122 days ago | 56 comments
Damas-Hindley-Milner inference two ways(bernsteinbear.com) Damas-Hindley-Milner (HM) is a type system for the lambda calculus (later adapted for Standard ML and the ML-family languages) with parametric polymorphism, aka generic functions. It sits at a sweet spot in PL design: the type system is quite expressive, and there are well known type inference algorithms that require absolutely no annotations from the programmer.
139 points by todsacerdoti 129 days ago | 11 comments
A dictionary of single-letter variable names(jackkelly.name) Haskell’s expressive type system means that type signatures can carry a lot of information. Haskell’s polymorphism means that you sometime write a function that works across an enormous range of types, and are often left wondering “what do I actually call my variables?”. It is often the case that there’s nothing to say beyond “this variable is a Functor”, or “this variable is a monadic action”, and so a single-letter variable name is appropriate.