develooper Front page | perl.perl5.porters | Postings from July 2012

Re: What would having a & prototype after the first position break?

Thread Previous | Thread Next
From:
Paul Johnson
Date:
July 6, 2012 03:14
Subject:
Re: What would having a & prototype after the first position break?
Message ID:
20120706101350.GF24333@pjcj.net
On Wed, Jul 04, 2012 at 12:58:21AM -0400, Chris Nehren wrote:
> Recently I've been working on a DSL of sorts that would be more
> succinctly expressed if I could have a prototype like ($&&). What would
> break if we allowed the & prototype after the first position? To make
> the proposed feature concrete, it would enable us to have syntax like
> (courtesy of LeoNerd):
> 
> generic_sort { $a <=> $b } { length $_ } @strings;
> 
> or (from my own code):
> 
> loop host 'shadowcat' => { do_stuff; };
> 
> I'm fine with doing the work to add this feature. I would just like to
> be sure I don't break half of CPAN with my efforts.
> 
> Thoughts? Comments? Rallying praise? Rotten tomatoes?

My recent rjbs induced trip down memory lane unearthed the following
message from a certain larry@wall.org:

  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1999-08/msg01111.html

Summary:

  - "I'm not saying it's impossible, just that it's difficult."
  - "I also suspect that this could be generalized into a macro capability"

See Ecclesiastes 1:9,10

-- 
Paul Johnson - paul@pjcj.net
http://www.pjcj.net

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About