News for hackers. Stuff that matters.
Re:The One Character Block Comment by waldrews on Tuesday July 21, 2009 @02:12PM (#716596)
Please please don't do this. It hurts readability, and relies on a subtle grammar ambiguity. Without a highlighting editor (e.g. reading a diff in a code review) I'll be scratching my head trying to read this. And tools like editors that have an imperfect parser are likely to get confused.

There's a chance you'll confuse yourself (or your code reviewer or other reader) and spend an hour debugging to find what you thought was commented out wasn't. That's not worth it to save one keystroke.

Re:The One Character Block Comment by Mintz on Tuesday July 21, 2009 @03:02PM (#716679)
I think the purpose the author shared this technique for is when you need to constantly comment/uncomment a block of code for testing.

I agree with you, though. Once you're done with your experiment, reset the commented lines to something more conventional.

Re:The One Character Block Comment by moe on Tuesday July 21, 2009 @05:10PM (#716867)
Even then, any editor worth its salt supports comment toggling with a single keystroke anyways. Good editors (vim, cough) can even toggle lines or paragraphs regardless of cursor position.

So I agree, this hack is more trouble than its worth.

Re:The One Character Block Comment by pbhjpbhj on Wednesday July 22, 2009 @07:03AM (#717669)
the FF webdeveloper extension is the one I find easiest for live CSS editing - though I'm using firebug more and more - it doesn't have comment toggling (it's just a text field). Such tricks are handy.

Unless you're trying to work them around CSS comment hacks!

Re:The One Character Block Comment by mjgoins on Tuesday July 21, 2009 @11:23PM (#717310)
Oh if I could upvote this comment more times I would.

The example code here made me immediately think of the lines of code that caused the Debian SSL catastrophe.