Skip to content

Empty returns #2923

@coachshea

Description

@coachshea

As much as I love coffeescript's automatic return feature (most of the time), there are times when I'm working on a library that mostly performs "actions" that don't need return values. Sometimes I simply ignore the return, but in cases where I am concerned about performance issues, I end up with many empty returns at the end of each function (because of nesting sometimes 2 empty returns are needed at different indentation levels). I would love to have a simply way to indicate to the compiler that I do not want a return. I was thinking of something like the . For example if the last line of my function reads doSomething() then a return statement is omitted form the compiled javascript. Also, for those cases where two return statements are currently needed because of nesting it would be great to simply end with doSomething()**

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions