Re: Re-thinking file test operations

2009-07-16 Thread Paul Hodges
--- On Thu, 7/9/09, Moritz Lenz mor...@faui2k3.org 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

Re: Re-thinking file test operations

2009-07-10 Thread Jonathan Scott Duff
On Thu, Jul 9, 2009 at 7:50 PM, Aristotle Pagaltzis pagalt...@gmx.dewrote: * Moritz Lenz mor...@faui2k3.org [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-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 Str,

Re: Re-thinking file test operations

2009-07-10 Thread Aaron Sherman
On Thu, Jul 9, 2009 at 6:22 PM, Moritz Lenz mor...@faui2k3.org 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

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 a...@ajs.com Date: Fri, Jul 10, 2009 at 6:58 PM Subject: Re: Re-thinking file test operations To: Mark J. Reed markjr...@gmail.com On Fri, Jul 10, 2009 at 5:31 PM, Mark J. Reed

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 markjr...@gmail.com Date: Fri, Jul 10, 2009 at 7:23 PM Subject: Re: Re-thinking file test operations To: Aaron Sherman a...@ajs.com You replied just to me, you know

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

Re: Re-thinking file test operations

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

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

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

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 Duncandar...@darrenduncan.net 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

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 Duncandar...@darrenduncan.net 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

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