Skip to content

Feature Request: Object cloning in function parameters #161

@dubiousdavid

Description

@dubiousdavid

It would be really cool to be able to declare a function parameter as an object that should be cloned, as opposed to passed by reference. It's really lame how Javascript co-mingles pass by value and pass by reference. Another option would be a flag to pass to the compiler, as I never want pass by reference in any LiveScript code.

billy = name: \Billy
name-to-upper = (^^person) -> person.name .= to-upper-case!
name-to-upper billy #=> 'BILLY'
billy #=> 'Billy'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions