Jessie
Jessie copied to clipboard
named arguments idiom: passing fresh mutable objects?
I was looking at some code carefully, in particular a call using "named arguments":
addBidCommand(interCmd, { tui, makeRpcClient, agd });
Is this allowed in Jessie? Could/should it be? It's statically evident that the caller no longer has access to the object and hence cannot mutate it.
Using object destructuring for "named arguments" is, IIUC, a best practice to manage more than 2 or 3 args in a function.
Callees don't assume their args are hardened, right? Jessie functions are callable from non-Jessie code, yes?