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

Fwd: Re-thinking file test operations

2009-07-10 Thread Mark J. Reed
My reply to the message Aaron sent directly to me by mistake... -- Forwarded message -- From: Mark J. Reed Date: Fri, Jul 10, 2009 at 7:23 PM Subject: Re: Re-thinking file test operations To: Aaron Sherman You replied just to me, you know. > In re-thinking it, we don

Fwd: Re-thinking file test operations

2009-07-10 Thread Aaron Sherman
Sorry, I sent this just to Mark. Wasn't my intention. -- Forwarded message -- From: Aaron Sherman Date: Fri, Jul 10, 2009 at 6:58 PM Subject: Re: Re-thinking file test operations To: "Mark J. Reed" On Fri, Jul 10, 2009 at 5:31 PM, Mark J. Reed wrote: >

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-thinking file test operations

2009-07-09 Thread Buddha Buck
Resent to list as I intended to in the first place 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 st

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 //

Re-thinking file test operations

2009-07-09 Thread Moritz Lenz
Hi, 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, there are a few points I can put my finger on: 1) $file ~~ :s returns a number, although smartmatching usually retur