subtype declarations

2005-05-02 Thread Luke Palmer
S12 says: subtype Str_not2b of Str where /^[isnt|arent|amnot|aint]$/; My brain parses this as: subtype Str_not2b[Str where /.../]; Or: subtype Str_not2b[Str] where /.../; Neither of which really reflect how it is really parsed. It looks like `subtype` has a special syntax. I

Re: subtype declarations

2005-05-02 Thread Thomas Sandlaß
Luke Palmer wrote: S12 says: subtype Str_not2b of Str where /^[isnt|arent|amnot|aint]$/; My brain parses this as: subtype Str_not2b[Str where /.../]; Or: subtype Str_not2b[Str] where /.../; I guess my mental parsing problems stem from the fact that it was you who told me about the

Re: subtype declarations

2005-05-02 Thread Steven Philip Schubiger
On 2 May, Luke Palmer wrote: : S12 says: : : subtype Str_not2b of Str where /^[isnt|arent|amnot|aint]$/; : : My brain parses this as: : : subtype Str_not2b[Str where /.../]; : : Or: : : subtype Str_not2b[Str] where /.../; : : Neither of which really reflect how it is really

Code classes

2005-05-02 Thread Thomas Sandlaß
HaloO, I don't know if this is usefull and if it is were this information should be put. I've reworked the Code class chart from A06 to look as follows: invocant(s) : Code _ :__ ___|___ | |: | | SubMethod Method : Sub

Re: Code classes

2005-05-02 Thread Ingo Blechschmidt
Hi, Thomas Sandla wrote: the main reason for this mail: aliasing $_ in methods to the first invocant would badly mix these two concepts! I think so, too. I'd like to see: $.foo# attribute of $?SELF @.foo# ditto %.foo# ditto .foo# method of $?SELF .foo#

Re: Junctions of classes, roles, etc.

2005-05-02 Thread Thomas Sandlaß
David Storrs wrote: Let's move this away from simple types like Str and Int for a moment. If you consider them simple... Tell me what this does: class Tree { method bark() { die Cannot instantiate a Tree--it is abstract! } } class Birch { method bark() { return White, papery } }

Re: Junctions of classes, roles, etc.

2005-05-02 Thread Abhijit Mahabal
On Mon, 2 May 2005, [ISO-8859-1] Thomas Sandlaß wrote: David Storrs wrote: Tell me what this does: class Tree { method bark() { die Cannot instantiate a Tree--it is abstract! } } class Birch { method bark() { return White, papery } } class Oak { method bark() { return Dark,

Open and pipe

2005-05-02 Thread Gaal Yahas
Here's a basic proposal for the open and pipe builtins. It was discussed on #perl6 today and seemed okay to the people there. I'd like to hear your comments, since the internals side of much of this is ready and is looking for an interface. module Prelude-0.0.1; class IO;

Re: Open and pipe

2005-05-02 Thread Juerd
Gaal Yahas skribis 2005-05-02 22:25 (+0300): open 'ls', '|-'; # or even open 'ls', :pipe = 'from' I dislike the hard-to-tell-apart symbols '' and '' for modes. 'r' and 'w' are much easier, and get rid of the awful left/right mnemonic that fails to make sense to GUI users.

Re: Formal Parameters To While Block

2005-05-02 Thread Larry Wall
On Sat, Apr 30, 2005 at 10:06:32AM -0600, Luke Palmer wrote: : Aaron Sherman writes: : On Tue, 2005-04-26 at 09:37 -0600, Luke Palmer wrote: : : We're thinking at the moment that `while` will probably look like this: : : sub statement:while (cond is lazy, block) { : [...] : :

Re: Open and pipe

2005-05-02 Thread Mark Reed
On 2005-05-02 15:52, Juerd [EMAIL PROTECTED] wrote: Gaal Yahas skribis 2005-05-02 22:25 (+0300): open 'ls', '|-'; # or even open 'ls', :pipe = 'from' I dislike the hard-to-tell-apart symbols '' and '' for modes. 'r' and 'w' are much easier, and get rid of the awful

Re: Open and pipe

2005-05-02 Thread Mark Reed
I take some of that back ­ actually, left-to-right directionality has almost nothing to do with understanding the and symbols. The arrow points in the direction information is flowing, which is left-to-right for but right-to-left for . I mean, ³filename² is pointing at the file, so the

Re: Open and pipe

2005-05-02 Thread Juerd
Mark Reed skribis 2005-05-02 16:13 (-0400): Holy matter of opinion, Batman. ŒŒ and Œ¹ are much easier to tell apart than Œr¹ and Œw¹; Obviously we disagree. What are the characters around the code supposed to be, by the way? Your mailer tells my mailer that you're sending iso-8859-1, but I

Re: Open and pipe

2005-05-02 Thread Mark Reed
On 2005-05-02 16:35, Juerd [EMAIL PROTECTED] wrote: What are the characters around the code supposed to be, by the way? Your mailer tells my mailer that you're sending iso-8859-1, but I seriously doubt that. Argh. Bad Entourage, no biscuit. Back to Mail as soon as I get Tiger installed,

Re: Open and pipe

2005-05-02 Thread Larry Wall
On Mon, May 02, 2005 at 10:25:08PM +0300, Gaal Yahas wrote: : Here's a basic proposal for the open and pipe builtins. It was discussed : on #perl6 today and seemed okay to the people there. I'd like to hear : your comments, since the internals side of much of this is ready and is : looking for an

Re: Open and pipe

2005-05-02 Thread Larry Wall
On Mon, May 02, 2005 at 02:23:36PM -0700, Larry Wall wrote: : : [1] Should this be Perl(..5) style? : : I think that'd be Perl-{1..5} style, as it currently stands, and : assuming you want to use the use syntax. Also, we haven't specced Er, make that Perl-(1..5) instead. One week in Russia and

Re: Formal Parameters To While Block

2005-05-02 Thread Larry Wall
On Sat, Apr 30, 2005 at 08:24:14PM -0600, Luke Palmer wrote: : Yeah, is lazy should be fine for now. The feature is definitely : there, but it might end up being called something different. is : braceless? I think is braceless is better, if only because it's longer. Though I still suspect it's

Re: S04 -- closure traits clarification

2005-05-02 Thread Larry Wall
On Fri, Apr 29, 2005 at 10:57:01AM -0500, David Christensen wrote: : 1) What type of introspection, if any, are we providing to the language : level? I.e., are we providing something along the lines of : : %traits = ?BLOCK.traits : : where %traits is keyed on trait name (FIRST, LAST,

Re: Open and pipe

2005-05-02 Thread Juerd
Larry Wall skribis 2005-05-02 14:23 (-0700): multi sub open ( multi sub openuri ( multi sub openpipe ( multi sub openshell ( Starting to look a lot like PHP there. How about open ::= File::open URI::open Sys::Pipe::open And put the other aliases in the

Re: S04 -- closure traits clarification

2005-05-02 Thread Larry Wall
On Mon, May 02, 2005 at 03:20:03PM -0700, Larry Wall wrote: : Probably does something like: : : ?BLOCK does First; # no-op if it already does First : ?BLOCK.firstlist.push(block); Probably shouldn't use up a normal name like First for that. Maybe we can just reuse the trait name as the

Re: Open and pipe

2005-05-02 Thread Larry Wall
On Tue, May 03, 2005 at 12:32:58AM +0200, Juerd wrote: : Larry Wall skribis 2005-05-02 14:23 (-0700): : multi sub open ( : multi sub openuri ( : multi sub openpipe ( : multi sub openshell ( : : Starting to look a lot like PHP there. And I care about that because PHP is

Re: Code classes

2005-05-02 Thread wolverian
On Mon, May 02, 2005 at 06:22:03PM +0200, Ingo Blechschmidt wrote: .foo# method of $?SELF .foo# method of $?SELF $_.foo# method of $_ We could also define them as: .foo # method on $?SELF .foo# method on $_ $_.foo # method on $_ The .foo syntax is

Re: Code classes

2005-05-02 Thread Larry Wall
On Mon, May 02, 2005 at 11:29:49PM +0300, wolverian wrote: : On Mon, May 02, 2005 at 06:22:03PM +0200, Ingo Blechschmidt wrote: : .foo# method of $?SELF : .foo# method of $?SELF : $_.foo# method of $_ : : We could also define them as: : : .foo # method on $?SELF

Re: LABELS: block

2005-05-02 Thread Larry Wall
On Tue, Apr 26, 2005 at 11:24:34AM -0600, Luke Palmer wrote: : That's true, but the former hasn't been accepted. That's not something : I considered when I was thinking about that proposal, but I think it's : a fairly minor issue. We'll ignore labels as we continue to weigh that : proposal, and

Re: Open and pipe

2005-05-02 Thread Uri Guttman
LW == Larry Wall [EMAIL PROTECTED] writes: LW multi sub opensocket ( LW Str +$mode = 'rw', LW Str +$encoding = 'auto', LW Str [EMAIL PROTECTED]) returns IO; and how will that support async (non-blocking) connects? or listen

Re: Open and pipe

2005-05-02 Thread Matt Fowles
All~ On 5/2/05, Uri Guttman [EMAIL PROTECTED] wrote: LW == Larry Wall [EMAIL PROTECTED] writes: LW multi sub opensocket ( LW Str +$mode = 'rw', LW Str +$encoding = 'auto', LW Str [EMAIL PROTECTED]) returns IO; and how

Re: Open and pipe

2005-05-02 Thread Uri Guttman
MF == Matt Fowles [EMAIL PROTECTED] writes: MF All~ MF On 5/2/05, Uri Guttman [EMAIL PROTECTED] wrote: LW == Larry Wall [EMAIL PROTECTED] writes: LW multi sub opensocket ( LW Str +$mode = 'rw', LW Str +$encoding = 'auto', LW Str [EMAIL PROTECTED]) returns IO; and how

Re: Junctions of classes, roles, etc.

2005-05-02 Thread David Storrs
On Mon, May 02, 2005 at 06:49:10PM +0200, Thomas Sandlaß wrote: David Storrs wrote: Let's move this away from simple types like Str and Int for a moment. If you consider them simple... When compared to arbitrary-class-that-was-defined-by- arbitrary-programmer-of-

Re: Junctions of classes, roles, etc.

2005-05-02 Thread Luke Palmer
David Storrs writes: On Mon, May 02, 2005 at 06:49:10PM +0200, Thomas Sandla wrote: David Storrs wrote: class Tree { method bark() { die Cannot instantiate a Tree--it is abstract! } } class Birch { method bark() { return White, papery } } class Oak { method

Re: Open and pipe

2005-05-02 Thread Matt Fowles
All~ On 5/3/05, Uri Guttman [EMAIL PROTECTED] wrote: MF == Matt Fowles [EMAIL PROTECTED] writes: MF All~ MF On 5/2/05, Uri Guttman [EMAIL PROTECTED] wrote: LW == Larry Wall [EMAIL PROTECTED] writes: LW multi sub opensocket ( LW Str +$mode = 'rw', LW Str +$encoding =