Stories
Slash Boxes
Comments
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

Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • It's maybe kinda obvious and you've probably already discussed this in depth, but wouldn't it be useful to try and pick some features like Perl 6 is doing?

    In particular, I'm thinking about named parameters: I think that if Perl 5 is going to have them, it would make sense to take the ones that will be in the future version of Perl, just to make transition smooth (for those who want to do the jump) and comprehension quick (for those who want to read both). Moreover, some topics have been probably already analysed, and even if TIMTOWDI... it could be worth to take a look to the neighbor's wheel!

  • junctions would make given even more powerfull and if (3 $a 7) { looks also very nice.
  • Especially if we could cheaply prevent those methods being called as functions.
  • by spacebat (7584) on 2008.01.14 1:52 (#60214) Homepage
    What I'd like to see is something like Python's generators. While one could argue we've got something similar by using closures, its not the same thing. Generators can return values with a yield statement, resume execution on the next line when they are called again, which can make the control flow in the generator much clearer.

    For me the real benefit of generators is that they are very fast, in the interpreter instead of 100+ lines of C to enter a function, once a generator is called initially its just a handful of lines to pass control back into it. This makes iteration fast and provides a way to sidestep the overhead of function calls that seems unavoidable in Perl.

    If I'm off base on this or Perl5/6 already has something like it, I'm most interested to know.

    Cheers!
    --
    Every token is like an unnecessary stain on whitespace and idleness.
  • by wdr1 (691) on 2008.01.15 3:18 (#60241)
    named subroutine parameters, please please please.
  • It would be SO cool if there was a way,
    use 'moderndot';
    or whatever that made $a.b mean $a->{b} and $a.b() mean $a->b() like every other language. Yes, I know this would not be backward compatible with string concat, but it's where Perl6 is going anyway.