Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[engine] Rules as decorators #4369
The "rule triple" / "task triple" syntax generally requires ~30 minutes worth of explanation for every new user. In particular, the triples look like they are decoupled from individual functions, when they are generally defined 1-to-1.
Switch the majority of rule declarations to a new
Fixes #4289; "task triples" are gone: long live the
thinking out loud about top level vocabulary, I wonder if “directive” is more descriptive for what a triple represents than “rule”. may be too entrenched to change w/o being a PITA at this point tho - but any chance to improve clarity for future task developers seems like it might be worth it at this point.
I like this because it puts more of product dispatch into one place. So instead of SelectLiteral, which binds a singleton to a particular rule, now any rule can depend on the singleton more easily.
It also removes the ability to declare intrinsics from python and simplies how intrinsics work, which makes sense to me.
Now intrinsics are dispatched just by product, which makes them easier to reason about. I still think we should ultimately have an explicit notion of intrinsic task, because it'll make manipulating them easier and ensure that their method of dispatch is consistent. But, I don't think it makes sense to do at this point.