Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

named arguments idiom: passing fresh mutable objects? #111

Open
dckc opened this issue Jun 16, 2023 · 0 comments
Open

named arguments idiom: passing fresh mutable objects? #111

dckc opened this issue Jun 16, 2023 · 0 comments

Comments

@dckc
Copy link
Contributor

dckc commented Jun 16, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant