Skip to content

named arguments idiom: passing fresh mutable objects? #111

Description

@dckc

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions