#Should you pass around std.process.Init everywhere?
1 messages · Page 1 of 1 (latest)
No, you trivially pass allocators and Io. Keep "juicy main" part inside of the main
I mean more for args and enviorment variables
Honestly you should extract/parse these inside of your main or something like that. Then just pass around the struct of options that your application needs. Not just raw environ
ok? So lets say I make a lib that uses idk posix and it uses enviorment vars, should I make the user of the lib pass in all the options for it...
What Im trying to say is that libraries are going to have to get in a bunch of paramaters to do simple logic?
its like pasing an add function to a math lib
Why would libraries even depend on the fact that the options are arriving from environ? Sounds stupid and unportable.