Interprocedural Sparse Conditional Type Propagation

by PaulHouleon 3/13/2025, 2:44 PMwith 11 comments

by Animatson 3/14/2025, 6:30 AM

You can do that. But as a language feature, inter-procedural inference creates problems for humans. There's no way for humans to see what type a function wants.

Language design seems to be converging on the idea that functions should have human-readable type signatures, but within functions, automatic inference can be used freely. In one direction, we have the "auto" inference mechanism of C and C++, and the local inference of Go and Rust. In the other direction, we have TypeScript for JavaScript and Python's rather strange unchecked optional typing. All those changes move towards the center position.

(Then, of course, there are "lambdas", but that's another subject.)

by tekknolagion 3/13/2025, 3:22 PM

One of the authors here. Would enjoy hearing what you think

by tineson 3/13/2025, 4:35 PM

> We know from experience that YJIT compiles over 9000 methods when running Shopify’s production code

All your methods are belong to us?