You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@effection/node main() is designed to implement the main method of a node process and yet we don't actually do the work of coupling to process.argv which has to be done manually, but in fact this is something that you invariably need to do.
There are two isues: convenience and isolation. Right now, we're forcing a program to couple to a global context for argument processing. That'll always be an option, but also passing in the arguments as an argument in this way let's your operation be used in any context, for example a unit-testing context.
@cowboyd given that main now also works in the browser, do you still feel we should do this, since there isn't really an equivalent to argv in the browser?
@cowboyd given that main now also works in the browser, do you still feel we should do this, since there isn't really an equivalent to argv in the browser?
We could say [] in the browser, but I don't feel strongly about this. I say let's not do it now since it can be a forward compatible change if we decide to do it later, but it will not be a backwards compatible change if we decide we don't want it in the future
@effection/node
main() is designed to implement the main method of a node process and yet we don't actually do the work of coupling toprocess.argv
which has to be done manually, but in fact this is something that you invariably need to do.Proposal, instead of
should be:
That way
becomes
The text was updated successfully, but these errors were encountered: