Interprocedural Sparse Conditional Type Propagation

railsatscale.com

69 points by PaulHoule 10 days ago


Animats - 9 days ago

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.)

tekknolagi - 10 days ago

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

tines - 10 days ago

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

All your methods are belong to us?