pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
markaddleman 2020-11-05T19:36:30.264200Z

I'm reading through Pathom3 docs. First, congratulations on excellent tutorial and documentation! The built-in resolvers look very convenient. Have you considered a built-in Parameters resolver? I imagine it would be similar to the Environment resolver but examine [:ast :params]

wilkerlucio 2020-11-06T13:46:57.264400Z

thanks 🙂 do you have a use case in mind for the params resolver generator?

markaddleman 2020-11-06T14:36:29.264700Z

Bear in mind that I'm pretty new to Pathom2 and haven't explored Pathom3 beyond reading the docs. Here is what I was thinking: With parameter support, the smart map becomes an immutable, central computing object. I would assoc in parameters and ask for a result back - and it would do all of the hard work of figuring out how to string together functions (resolvers) to obtain the result. From a more mundane point of view, I have several resolvers that require parameters. It is inconvenient (and frankly a little weird) to inspect (-> env :ast :params) to obtain the information. Instead, it would be much more convenient to declare parameters as inputs to the resolver.

markaddleman 2020-11-06T14:38:31.264900Z

Carrying this last example just a little further, I guess that most resolvers that require the env parameter only require it in order to access parameters. With a Parameter resolver, I imagine nearly all resolvers become a single arg function. I don't have a firm reason to think this is a good thing but it feels like a move in the right direction.

wilkerlucio 2020-11-06T14:40:58.265100Z

at this moment I don't really see much usage on that sense, with any of the helpers you can already use params, maybe there is some misconception going on in our little chat here

wilkerlucio 2020-11-06T14:41:27.265300Z

if you have a concrete use case, we can discuss around it

markaddleman 2020-11-06T14:42:44.265500Z

Sounds good