Skip to content

get rid of % variables #65

@cooper

Description

@cooper

Too confusing and ugly.

Couple alternatives. this is the current way.

func ping {
    need $msg
    %send("PONG :" + $msg.params[-1])
}

Passing the object as a normal argument

func ping {
    need $msg, $conn
    $conn.send("PONG :" + $msg.params[-1])
}

Using _self and a requirement for the special variable *self

func ping {
    need *self: Connection, $msg
    @send("PONG :" + $msg.params[-1])
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions