Remix.run Logo
jerf 2 days ago

Your configuration structs are not "everything". You probably have dozens of things in them. You have hundreds to thousands of different parameters to different functions. By the time your configuration structs have hundreds of things in them you have thousands to tens of thousands of parameters to functions. Only a fairly small fraction of things make it all the way up to main.

This is exactly what I was talking about with this being a "cognitively available" operation. You notice when you have to propagate something all the way up to the top precisely because it is not something you do very often and it stands out as an exception when you do. If you are literally propagating everything up to main, all the time, every time you change any function anywhere in your program, you are doing something very, very wrong.

Joker_vD 20 hours ago | parent [-]

I'm not talking about configuration structs, I'm talking about actual, constructed dependencies being passed around in large sacks, sorry, structs.

And you don't have to propagate every parameter up to main because a) not all things are made in it, b) things that are being made in it are already being made in it and so, are already being passed down. This passing down stops down somewhere, which is where you reinstate it, not all the way up in main.