Re: UNIX commands: chmod

2006-03-27 Thread Jonathan Lang
Damian Conway wrote: > In other words, this is another example of "Don't use junctions in actions > with side-effects". Why not tag functions with side-effects as such (using a trait to that effect), and then say that short-circuit operators don't short-circuit when side-effects are involved? Or

Re: UNIX commands: chmod

2006-03-27 Thread Damian Conway
Larry wrote: On Sun, Mar 26, 2006 at 02:40:03PM -0800, Larry Wall wrote: : On the original question, I see it more as a junctional issue. : Assuming we have only chmod($,$), this sould autothread: : : unless chmod MODE, all(@files) -> $oops { : ???; : profit(); : } Except

Re: UNIX commands: chmod

2006-03-27 Thread Damian Conway
Jonathan Lang wrote: How important is it that perl 6 maintains the notion that $foo and @foo are entirely different things? Very. Also, there's the matter of "unneccessary paperwork": if the only thing that I use the return value for is a boolean test, then all of the effort involved in l

Re: UNIX commands: chmod

2006-03-26 Thread Jonathan Lang
Mark Overmeer wrote: > * Larry Wall ([EMAIL PROTECTED]) [060327 01:07]: > > On Sun, Mar 26, 2006 at 02:40:03PM -0800, Larry Wall wrote: > > : On the original question, I see it more as a junctional issue. > > : Assuming we have only chmod($,$), this sould autothread: > > : > > : unless chmod MO

Re: UNIX commands: chmod

2006-03-26 Thread Mark Overmeer
* Larry Wall ([EMAIL PROTECTED]) [060327 01:07]: > On Sun, Mar 26, 2006 at 02:40:03PM -0800, Larry Wall wrote: > : On the original question, I see it more as a junctional issue. > : Assuming we have only chmod($,$), this sould autothread: > : > : unless chmod MODE, all(@files) -> $oops { > :

Re: UNIX commands: chmod

2006-03-26 Thread Larry Wall
On Sun, Mar 26, 2006 at 02:40:03PM -0800, Larry Wall wrote: : On the original question, I see it more as a junctional issue. : Assuming we have only chmod($,$), this sould autothread: : : unless chmod MODE, all(@files) -> $oops { : ???; : profit(); : } Except that junctional l

Re: UNIX commands: chmod

2006-03-26 Thread Larry Wall
On Sat, Mar 25, 2006 at 01:22:18PM +0200, Gabor Szabo wrote: : On 3/25/06, Nicholas Clark <[EMAIL PROTECTED]> wrote: : > On Sat, Mar 25, 2006 at 12:58:30PM +0200, Gabor Szabo wrote: : > > 4) "filename".chmod(MODE) should also work and I guess : > > .chmod(MODE) should also work on those 3 file

Re: UNIX commands: chmod

2006-03-26 Thread Mark Overmeer
* Gabor Szabo ([EMAIL PROTECTED]) [060326 19:26]: > On 3/26/06, Mark Overmeer <[EMAIL PROTECTED]> wrote: > > > LIST = chmod MODE, LIST > > > > My feeling is that this function design is a bit of a mistake. Usually, > > one perl function maps on one operating-system function, but in this case > > i

Re: UNIX commands: chmod

2006-03-26 Thread Gabor Szabo
On 3/26/06, Mark Overmeer <[EMAIL PROTECTED]> wrote: > > LIST = chmod MODE, LIST > > My feeling is that this function design is a bit of a mistake. Usually, > one perl function maps on one operating-system function, but in this case > it doesn't: it simulated the common chmod(1) user command. [..

Re: UNIX commands: chmod

2006-03-26 Thread Mark Overmeer
* Gabor Szabo ([EMAIL PROTECTED]) [060325 09:58]: > So we had chmod in Perl5, I would like to make sure it works in > Perl6 as well with slight modifications. > > LIST = chmod MODE, LIST My feeling is that this function design is a bit of a mistake. Usually, one perl function maps on one operati

Re: UNIX commands: chmod

2006-03-25 Thread Jonathan Lang
Damian Conway wrote: > One might argue that it would be more useful to return a result object whose > boolean value is the success or failure, whose numeric and string values are > the number of files *un*changed, and whose list value is the list of those > *un*changed files. > > Then you could wri

Re: UNIX commands: chmod

2006-03-25 Thread Damian Conway
Gabor Szabo wrote: Hmm, I don't really know how to do this but Gaal told me to write up some proposal here. So we had chmod in Perl5, I would like to make sure it works in Perl6 as well with slight modifications. LIST = chmod MODE, LIST 1) In list context it would return the names of the file

Re: UNIX commands: chmod

2006-03-25 Thread Gabor Szabo
On 3/25/06, Nicholas Clark <[EMAIL PROTECTED]> wrote: > On Sat, Mar 25, 2006 at 12:58:30PM +0200, Gabor Szabo wrote: > > 4) "filename".chmod(MODE) should also work and I guess > > .chmod(MODE) should also work on those 3 files > > That seems to be implying a chmod method on all strings, and al

Re: UNIX commands: chmod

2006-03-25 Thread Nicholas Clark
On Sat, Mar 25, 2006 at 12:58:30PM +0200, Gabor Szabo wrote: > 4) "filename".chmod(MODE) should also work and I guess > .chmod(MODE) should also work on those 3 files That seems to be implying a chmod method on all strings, and all lists. Assuming chmod doesn't get special favours, how many m

UNIX commands: chmod

2006-03-25 Thread Gabor Szabo
Hmm, I don't really know how to do this but Gaal told me to write up some proposal here. So we had chmod in Perl5, I would like to make sure it works in Perl6 as well with slight modifications. LIST = chmod MODE, LIST 1) In list context it would return the names of the files successfully ch