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.
  • How many useful development tools are we willing to sacrifice (making development harder) in order to make development "easier".

    I'd have some sympathy if there were any chance of getting (for example) function signatures, the method keyword, or the class keyword into Perl 5 this side of the heat death of the universe, but that's not going to happen because "that would make maintaining existing code harder".

    • You know, that's funny, because working method signatures in Perl 5 are one of my new favourite things.

      use MooseX::Method::Signatures;
      method morning (Str $name) {
          $self->say("Good morning ${name}!");

      • Which demonstrates my point that there will be an increasingly widespread use of source filters... (I'm assuming that's what that it implemented using).

        • Nope, MooseX::Method::Signatures is Devel::Declare and a heaping spoonful of other magic.

          • ... and Devel::Declare is a source filter, albeit (as peregrin put it on #p5p) "keyhole source filters".

            • While its true DD and traditional source filters both change the source code, it is unfair to simply lump DD in with source filters. "Source filter" is a dirty word. DD does not share the traditional problem with source filters, that of trying to parse Perl and their global nature. For example, a source filter might decide to alter code-like strings and regexes. DD won't be fooled by that. It gets around this problem by (ab)using Perl's own parser.

              DD brings in its own bag of problems, but calling it a source filter seems dismissive.

              • I agree that it does not share some of the side-effects, and the level of collateral damage is greatly reduced.

                But it still makes arbitrary changes to the lexical structure of the language. From a static parsing point of view, THAT is the critical problem here.

                The problems with collateral damage are only a problem from the point of view of an executing parser.