Skip to content

Block and Partial Line Commenting #368

Closed
@ghost

Description

It would be great if CoffeeScript could have block and partial line commenting similar to JS's /* ... */.

Here are two useful use cases:

  1. Embedding comments in the middle of a line -- for example, to use a technique outlined in David Flanagan's "JavaScript: The Definitive Guide" book:
func: (one, two, three, /* optional */ four, /* optional */ five) ->
  1. Commenting out blocks of code for debugging purposes.

jashkenas pointed out on IRC that you can already do that by selecting all the lines and commenting out all of them using a proper shortcut key, if the editor supports it.

But that's the thing: if the editor supports it. If you're using a bare-bones UNIX editor installed by default on a remote machine, you possibly don't have such a line-commenting command available for CoffeeScript.

What do you think?

Am I the only one liking David Flanagan's technique to mark optional arguments? Do you find it useful? Would you consider using it?

And the ease of commenting out lots of lines by just typing, in JS's case, /* and */ before and after those lines in a simple editor? Do you care about this, e.g., when remotely accessing UNIX machines?

jashkenas told me to bring this up for discussion... so, here it is. :)

Please post here on whether you consider block and partial line commenting useful or not.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions