I kind of want `Get`s to use named args, because I...
# development
a
I kind of want `Get`s to use named args, because I’m never going to remember what order things go in
a
there's the "informal" version
Get(<ProductType>, <SubjectType>(<subject value>))
which seems neat
i tend to read
Get(<P>, <S>, <value>)
as "given this value, interpret it as an S, and execute the rule to convert it to a P" right to left
where would you see names being used?
(I like named arguments a lot in general)
i can see
Get(to=ProductType, from=SubjectType, subject=my_value)
being neat
a
Yeah, exactly like that, with `to`/`from`/`subject` or something 🙂 Literally everywhere that
Get
is called
a
i would actually be totally down for that i just need to drop into rules.py again to see where to change
a
Woo 🙂
(I still long for a language feature of “require this arg to be a named arg”)
a
i feel like if we're parsing the rule body anyway we could check while processing that AST that the Get() invocation has named args
a
We could I guess… Hmm… I’m not sure how I feel about that…