I'm trying to understand how the ecosystem of packages and platforms will coevolve. So I have some questions:
Great questions @Eric Rogstad
I think you may find the Module Params proposal an interesting read.
https://docs.google.com/document/d/110MwQi7Dpo1Y69ECFXyyvDWzF4OYv1BLojIm08qDTvg/edit?usp=drivesdk
Agus has done a lot of work on that and hopefully it's almost ready for prine time :grinning:
Basically the short answer is that packages are platform independent, and Tasks can be passed in as Module Parameters so the packages can use effects and implements things in an agnostic way. So platforms only need to define a low level set of primitives and then packages can take it from there with pure Roc. :rock_on:
Thanks @Luke Boswell! Just to clarify — is everything after "Basically the short answer is that ..." a description of the current design, or a description of the Module Params proposal?
It is a description of once module params are fully implemented
Currently we have pure roc libraries, but they can't depend on types from platforoms
That said, you can pass a lambda into each function and generate tasks from a pure roc library that way
To answer 1 and 3, packages are orthogonal to platforms, and any package can be used with any platform. If you have code that's specific to a platform, you'll probably want to put it in the platform itself. Packages like JSON or date times have no side effects, so they're implemented in pure Roc and work with any platform
Yeah, what Brendan said :point_up: :sweat_smile:
Also, some packages will kinda be platform dependent. For example, a postgres querying library may take module params to manage tcp connections. That library will only work with platforms that have tcp primitives.
Got it, so we have pure roc libraries / packages now. But if you want to depend on anything you might get from a platform, you'd currently be coupled to a specific platform. Whereas if the Module Params proposal goes through, then you could depend on stuff from platforms in a kind of generic way, that could be implemented differently in different platforms.
Do I have all that right?
That Module Params proposal sounds really clever, btw. And it also sounds like it's what Richard starts describing at the 54:35 mark here:
https://www.youtube.com/watch?v=DzhIprQan68&t=3275s
Seems like a good design!
yeah you have that right
if the Module Params proposal goes through
It is accepted. Just have to wait for it to be fully implemented.
Last updated: Jul 06 2025 at 12:14 UTC