Re: Required Named Params and "go write your own grammar"

2004-05-04 Thread Abhijit A. Mahabal
On Tue, 4 May 2004, Luke Palmer wrote: > Abhijit A. Mahabal writes: > > Needing to know "the entire P6 grammar" isn't mouth watering. > > grammar Grammar::ReqNamed { > is Grammar::Perl; Ah, I see. That does answer my question. I had forgotten that grammers can be inherited from and y

Re: Required Named Params and "go write your own grammar"

2004-05-04 Thread Luke Palmer
Abhijit A. Mahabal writes: > As I try writing P6 programs I do find myself needing required named > params, and I thought I'd like something like ++$named_req for myself as a > shorthand for "+$named_req is required" or whatever is decided. > > Now, larry often says (only partly jokingly) "go writ

Re: A12: Required Named Parameters Strike Back!

2004-05-04 Thread Luke Palmer
Dov Wasserman writes: > Long-time lurker, first time poster. Dittos, kudos, etc. Welcome aboard. > Since in the rest of Perl 6, the '~' operator involves string > representation, perhaps the standard +$foo marker should really be ~$foo: > i.e., $foo only has a (string) name, not a numeric positio

Re: A12: on inheriting wrappers

2004-05-04 Thread Larry Wall
On Tue, May 04, 2004 at 03:41:58PM +0200, Aldo Calpini wrote: : but: what if Animal does inherits from something else? what I would like : to do (what I was trying to do with wrappers, that is) is to call the : inherited constructor, then do something with the returned object. : something like: :

Re: Required Named Params and "go write your own grammar"

2004-05-04 Thread Juerd
Abhijit A. Mahabal skribis 2004-05-04 10:27 (-0500): > As I try writing P6 programs I do find myself needing required named > params, and I thought I'd like something like ++$named_req for myself as a > shorthand for "+$named_req is required" or whatever is decided. What's wrong with just specifyi

Required Named Params and "go write your own grammar"

2004-05-04 Thread Abhijit A. Mahabal
As I try writing P6 programs I do find myself needing required named params, and I thought I'd like something like ++$named_req for myself as a shorthand for "+$named_req is required" or whatever is decided. Now, larry often says (only partly jokingly) "go write your own grammar". But I do not kno

Re: A12: on inheriting wrappers

2004-05-04 Thread Aldo Calpini
On Fri, 2004-04-30 at 19:01, Larry Wall wrote: > That would almost certainly fail with an error saying that it couldn't > find your &new subroutine. The & sigil does not imply dispatch, and > the default .new is inherited, not autogenerated, last I checked. :-) ouch. too true. so I guess my Ani

Re: A12: Required Named Parameters Strike Back!

2004-05-04 Thread Dov Wasserman
Long-time lurker, first time poster. Dittos, kudos, etc. Back on the topic of required named parameters, I think John Siracusa's initial post did a good job of separating the two concepts of parameter mandate (required vs. optional) and parameter designation (by position vs. by name). Each of thes