Re: Re-thinking file test operations

2009-07-16 Thread Paul Hodges
--- On Thu, 7/9/09, Moritz Lenz wrote: > . . . > Somehow the current file test syntax, 'filename' ~~ :e, looks like a not > well-though-out translation of Perl 5's syntax, -e 'filename'. > Apart from totally feeling wrong to me, Dunno about totally. I'm still trying to get a P6 mindset, but the

Re: Re-thinking file test operations

2009-07-10 Thread Aaron Sherman
On Thu, Jul 9, 2009 at 6:22 PM, Moritz Lenz wrote: > > $str.File.e # same, different names Brainstorming a bit here Str is a class that describes collections of characters (among some other typographical constructs, yadda, yadda, Unicode, yadda). There is a commonly used speci

Re: Re-thinking file test operations

2009-07-10 Thread Daniel Ruoso
Em Qui, 2009-07-09 às 22:50 -0400, Buddha Buck escreveu: > Both the separate pathname type and the stat($str, :e) proposal > salvage the purity of Str, so either would be acceptable to your > argument. The bigger problem of using a different type is that "/etc/passwd" ~~ :e Would dispatch to S

Re: Re-thinking file test operations

2009-07-10 Thread Jonathan Scott Duff
On Thu, Jul 9, 2009 at 7:50 PM, Aristotle Pagaltzis wrote: > * Moritz Lenz [2009-07-10 00:25]: > > stat($str, :e)# let multi dispatch handle it for us > > This gets my vote. Me too. -Scott -- Jonathan Scott Duff perlpi...@gmail.com

Re: Re-thinking file test operations

2009-07-09 Thread Timothy S. Nelson
On Thu, 9 Jul 2009, Mark J. Reed wrote: A few months ago (or maybe more) I proposed making pathnames their own type, distinct from (or perhas a subclass of) strings, but easily constructed from strings, maybe with an operator. Having those 29 single-letter methods on such a class would not bug

Re: Re-thinking file test operations

2009-07-09 Thread Darren Duncan
Buddha Buck wrote: On Thu, Jul 9, 2009 at 9:32 PM, Darren Duncan wrote: Mark J. Reed wrote: A few months ago (or maybe more) I proposed making pathnames their own type, distinct from (or perhas a subclass of) strings, but easily constructed from strings, maybe with an operator. Having those 29

Re: Re-thinking file test operations

2009-07-09 Thread Brandon S. Allbery KF8NH
On Jul 9, 2009, at 18:22 , Moritz Lenz wrote: Somehow the current file test syntax, 'filename' ~~ :e, looks like a not well-though-out translation of Perl 5's syntax, -e 'filename'. That would be because it is; originally the filetests were perl5- style, but pugs refused to parse them becaus

Re: Re-thinking file test operations

2009-07-09 Thread Darren Duncan
Mark J. Reed wrote: A few months ago (or maybe more) I proposed making pathnames their own type, distinct from (or perhas a subclass of) strings, but easily constructed from strings, maybe with an operator. Having those 29 single-letter methods on such a class would not bug me as much as having

Re: Re-thinking file test operations

2009-07-09 Thread Mark J. Reed
A few months ago (or maybe more) I proposed making pathnames their own type, distinct from (or perhas a subclass of) strings, but easily constructed from strings, maybe with an operator. Having those 29 single-letter methods on such a class would not bug me as much as having them on Str. On 7/9/0

Re: Re-thinking file test operations

2009-07-09 Thread Aristotle Pagaltzis
* Moritz Lenz [2009-07-10 00:25]: > stat($str, :e)# let multi dispatch handle it for us This gets my vote. -- Aristotle Pagaltzis //