Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • people who commented things out by putting #s at the absolute beginning of lines might accidentally create embedded comments by placing their # next to a curly brace or a parenthesis or a bracket. [...] I've now learned to put ## at the beginning of lines I want to comment out instead of just #.

    Is it too late to spec this in S02 the other way around? Let single # be used for commenting out, no matter what follows. Let ## (perhaps also ### and so on) switch on the special behaviour of brackets etc.

    The rationale is:

    1. Using # for commenting out code like in lots of currently used languages inclusive Perl 5 is stays unsurprising.
    2. Enabling some lesser used/esoteric behaviour takes some slightly more effort than the normal case.
    • I kinda like that way of thinking. And no, it's not too late to spec things differently.

      However, if you want your proposal to be noticed and possibly acted upon, you really should send an email off to perl6-language []. That's where language features and spec changes are discussed.

    • Hmm, a row of hashes, optionally followed by other text, is often used for a separator, so there is still some potential for getting "special" meaning where none was intended if multi-hash is changed to mean "special" handling.

      How about making the special codes a bit harder to get by accident?  Something like #{#  ... #}# - with no whitespace permitted between the braces and the enclosing hashes - for a block delimited comment, perhaps.  That would only be an accidental hazard for people who