Re: the handiness of undef becoming NaN (when you want that)

2001-10-19 Thread Aaron Sherman
strict vars; does not recognize use of new array indices as unitialized variables. Yes, but do you really want to break: $z[0] = 50; $z[2] = 20; @x = @y[@z]; -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint: www.ajs.com

AOP

2001-10-24 Thread Aaron Sherman
into focus for me, and I want to spend more time reading the articles later, but for now I just wanted to see if anyone else has been thinking these thoughts -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint: www.ajs.com/~ajs6DC1 F67A B9FB 2FBA

RFC: Anonymous classes

2001-10-24 Thread Aaron Sherman
Is it too late for RFCs? How does one get approved for submission these days? Or, do we just mail them off to [EMAIL PROTECTED]? =head1 TITLE Anonymous classes =head1 VERSION Maintainer: Aaron Sherman [EMAIL PROTECTED] Date: 24 October 2001 Version: 1 Mailing List: perl6-language

Re: Beating string numerification to death [Was: Re: the handiness of undef becoming NaN (when you want that)]

2001-10-25 Thread Aaron Sherman
(WARN_VERBOSE_NUMERIC) || !looks_like_number(sv))) not_a_number(sv); return Atof(SvPVX(sv)); } -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint: www.ajs.com/~ajs6DC1 F67A B9FB 2FBA D04C 619E FC35 5713 2676 CEAF

Re: Perl 6 - Cheerleaders?

2001-10-26 Thread Aaron Sherman
to be a very ovious meaning, given what .{NAME} is going to mean inside of the method. Then again, we could call it all quits and come up with a naming convention that allows some members to be automatically exported as methods, and others to be withheld. -- Aaron Sherman [EMAIL PROTECTED

Re: Perl 6 - Cheerleaders?

2001-10-29 Thread Aaron Sherman
; sub fu { my $bar; } } Is that something to encourage? Is accessing a method caller's namepsace desirable? That seems as bad as the caller accessing the member variables. -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL

Re: Perl 6 - Cheerleaders?

2001-10-29 Thread Aaron Sherman
and essential syntax. I'm planning to write a Perl6::Classes module as a proof-of-concept to accompany my proposal. Ok. I'll keep an eye out for this, and meanwhile I'll dust off my BNF skills. -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint

Re: %MY:: (was Re: Perl 6 - Cheerleaders?)

2001-10-29 Thread Aaron Sherman
will be available. -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint: www.ajs.com/~ajs6DC1 F67A B9FB 2FBA D04C 619E FC35 5713 2676 CEAF Write your letters in the sand for the day I'll take your hand In the land that our grandchildren

Re: Perl 6 - Cheerleaders?

2001-10-29 Thread Aaron Sherman
do that like so (using Larry's preferred syntax): [...] method INIT ($idval) { $.id := $idval } Hm... that looks to me like a regular :=; is it? If so, what good is is const if you can override it with a :=? Am I missing something? -- Aaron Sherman [EMAIL PROTECTED] finger

Re: Perl 6 - Cheerleaders?

2001-10-30 Thread Aaron Sherman
, this was never very clean or obvious to the casual programmer. Constants have been coming of age in Perl, and they're kind of scary if they're not constant. -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint: www.ajs.com/~ajs6DC1 F67A B9FB 2FBA D04C

Re: Quick question on subroutine declaration syntax

2001-10-30 Thread Aaron Sherman
that $bar is of type int or to say that $bar is whatever it is, but will always be forced into an int when its value is taken (much like the behavior of Perl6 hash keys)? I could see each of those being useful, but I'm not sure they are all neccessary. -- Aaron Sherman [EMAIL PROTECTED

Re: Constants

2001-10-31 Thread Aaron Sherman
our $.author is eternal = 'Larry'; Meaning you can have a new author, but only by killing the old one ;-) Speaking of killing the old one, I assume that: $a = 1; $b = 2; $c := $a; $a := $b; Will leave: $c == 1 $a == 2 True? -- Aaron Sherman

Re: General Feelings on Apoc 3

2001-10-09 Thread Aaron Sherman
, which is also not currently legal, AFAIK $live.happy or else die Sad Hmm gets me thinking evil thoughts... like having else be the low-prec. //, and then or else be synonymous with ``else die $!'' so you get: $live.happy or else Read my lips: NO NEW TOKENS! ;-) -- Aaron

Re: General Feelings on Apoc 3

2001-10-09 Thread Aaron Sherman
so that $donuts doh burp!!! Would do what you expect. In our next issue, I'll be getting into the intricacies of the chainable diddly-aye-o suffix operator -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint: www.ajs.com/~ajs

Re: Just a thought...

2001-10-09 Thread Aaron Sherman
brain. -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint: www.ajs.com/~ajs6DC1 F67A B9FB 2FBA D04C 619E FC35 5713 2676 CEAF Write your letters in the sand for the day I'll take your hand In the land that our grandchildren knew. -Queen

Re: string representations

2001-10-09 Thread Aaron Sherman
to give repr() its due in a perl example. sub repr { my $str = shift; qq{\Q$str\E} } or, Perl6ish: sub repr ($str) { qq{\Q$str\E} } Dunno what it's useful for, but Perl's got it. -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint

Re: NaN semantics

2001-10-10 Thread Aaron Sherman
for the binary meaning. Question on the NIST definitions though: What does 1eie1i mean? I *think* that that's 2^60 times ten to the 1i... correct? Do we have precidence in mind, here? Can I say 1iei? Does anyone *do* that? -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED

Re: reduce via ^

2001-10-10 Thread Aaron Sherman
, as well? Will, @a = ^-@b; work? -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint: www.ajs.com/~ajs6DC1 F67A B9FB 2FBA D04C 619E FC35 5713 2676 CEAF Write your letters in the sand for the day I'll take your hand In the land

Re: NaN+NaNi

2001-10-11 Thread Aaron Sherman
garbage. No, I think if you want 10_000 to be 1, you can always eval it, but I don't think anyone reading in text should expect that. -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint: www.ajs.com/~ajs6DC1 F67A B9FB 2FBA D04C 619E FC35 5713

Re: Hyperoperators and RFC 207

2001-10-11 Thread Aaron Sherman
of adverbial modification would be more effective (e.g. having a way to specify an incrementor variable or the temporary variable for map would allow nested maps to be more useful). -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint: www.ajs.com/~ajs

Re: Apropos of nothing...

2001-12-20 Thread Aaron Sherman
] = foo(); would be. Next question, though: $val = (foo())[0]; List? -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint: www.ajs.com/~ajs6DC1 F67A B9FB 2FBA D04C 619E FC35 5713 2676 CEAF Write your letters in the sand

Re: 123_456

2002-01-25 Thread Aaron Sherman
On Fri, 2002-01-25 at 12:38, Bryan C. Warnock wrote: On Friday 25 January 2002 12:34, Simon Cozens wrote: Should we be allowed to use _ to group numbers, now that _ is concat? If not _, then what? (if anything?) Sure, why not? '_' is still a valid character in an identifier. You'd

Perl6 -- what is in a name?

2002-01-28 Thread Aaron Sherman
I'm going to just say this, and I ask that everyone who reads it take a deep breath, count to 10 and then respond if you wish. I was reading Apoc 4 and while marveling at the elegence of what Larry's doing to the language, I had an epiphany. Perl6 is simply not Perl. It's about as much Perl as

Re: Barewords and subscripts

2002-01-28 Thread Aaron Sherman
On Sat, 2002-01-26 at 12:01, Simon Cozens wrote: A4 said that there were no barewords in Perl 6. Does this mean that $foo{bar} actually should be written %foo{bar} Hmm... I'm curious, has anyone yet tackled printf(%d{x},%d{x})? Is that a bug or does it produce n{x} where n is the

Mono and Perl6....

2002-02-06 Thread Aaron Sherman
Ok, so I read Miguel's message: http://mail.gnome.org/archives/gnome-hackers/2002-February/msg00031.html I drank the cool-aid and now I find myself thinking... should Perl6 compile down to its own byte-code or to Mono's CIL? Miguel feels this is the way to go, and if Mono's bytecode is in fact

Re: RFC: new logical operator

2002-02-21 Thread Aaron Sherman
On Thu, 2002-02-21 at 09:01, Sam Vilain wrote: On Thu, 21 Feb 2002 06:50:13 -0600 [EMAIL PROTECTED] wrote: On Thu, Feb 21, 2002 at 12:30:11PM +, Sam Vilain wrote: I think Perl 6 should have a but keyword, as in: if (defined $foo but $foo eq ) { *scratches head* so... it

Re: RFC: new logical operator more syntactic maple syrup

2002-02-22 Thread Aaron Sherman
On Thu, 2002-02-21 at 19:49, Larry Wall wrote: David M. Lloyd writes: : On Thu, 21 Feb 2002, Sam Vilain wrote: : : I can't count the number of times I've had to do something like: : :if (defined $foo and $foo ne bar) { } : : to avoid my program writing garbage to STDERR. : :

Re: Loop exiting

2002-02-25 Thread Aaron Sherman
On Mon, 2002-02-25 at 10:47, Simon Cozens wrote: given (...) { ... break; for (...) { ... last; Same concept, different keyword. Good idea? Larry pointed this out. His reasoning was that given isn't exactly a loop construct to the user. I know that I'm more

Re: Topicalizers: Why does when's EXPR pay attention to topicalizer r egardless of associated variable?

2002-03-26 Thread Aaron Sherman
On Thu, 2002-03-21 at 12:52, Allison Randal wrote: On Wed, Mar 20, 2002 at 09:59:35AM -0800, Larry Wall wrote: I should update y'all to my current thinking, which is that $_ is always identical to the current topic, even if the topic is aliased to some other variable. To get at an outer

Re: Topicalizers: Why does when's EXPR pay attention to topicalizer r egardless of associated variable?

2002-03-27 Thread Aaron Sherman
On Tue, 2002-03-26 at 13:19, Larry Wall wrote: Aaron Sherman writes: : Ok, so am I to take it that you could say: : : FOO: for x { : BAR: for y { : print $FOO::_; : } : } Er, I don't think so. : Or is OUTER a special-case label? It's a special case like MY

Re: Perl6 Macros

2002-03-27 Thread Aaron Sherman
On Tue, 2002-03-26 at 16:26, Michel J Lambert wrote: An example of where variable capture is needed is: macro println ($a) { return EOF; print $a; print \n; EOF } for my $b (1..100) { println $b; } Ok, I don't get it. I'm willing to concede that I'm dense, but I need to

Re: Perl6 Macros

2002-03-27 Thread Aaron Sherman
First impression: Don't go there. Longer answer: On Wed, 2002-03-27 at 16:29, Michel J Lambert wrote: New syntax is 'qs', aka quote sub, which is similar to q, except that it interpolates all of: ${..} {..} and %{..} All subroutines which are interpolated, are interpolated as regular text,

Re: Perl6 Macros

2002-03-28 Thread Aaron Sherman
On Wed, 2002-03-27 at 19:46, Michel J Lambert wrote: Macros could add something to Perl, but I don't see why having a macro return a string instead of looking and acting like a subroutine would be a bad thing. In fact, as I pointed out before, you can do almost all of the scoping stuff

Re: Perl6 Macros

2002-03-28 Thread Aaron Sherman
On Thu, 2002-03-28 at 10:19, Aaron Sherman wrote: Here's what I suggest as a compromise: macro forall ($iterator, $list, $block) { my ltmp = ($list); foreach $iterator - ltmp $block } forall{$var}{@list}{{print;}}; Where the parser sees macro NAME PARAMS BLOCK

Re: Tree Transformations (was: Perl6 Macros)

2002-04-01 Thread Aaron Sherman
On Sat, 2002-03-30 at 21:41, Michel J Lambert wrote: Too late. I'm going there... :) Good for you. I was hoping transformations could make it :) Why didn't you chime in support before, then? I feel like Aaron and I are the only ones who are opinionated on this matter... Hopefully, this

Re: The new =~, and chaining statement modifiers

2002-04-04 Thread Aaron Sherman
On Wed, 2002-04-03 at 20:49, Larry Wall wrote: : Additionally, can you chain statement modifiers? : : do_this() if $a unless $b; [...] No, still can't chain them. That's a darned shame. In p5, I keep going back to code and finding something like: print foreach x; and wanting to

Re:http://archive.develooper.com/perl6-announce-rfc@perl.org/msg00318.html

2002-04-04 Thread Aaron Sherman
On Thu, 2002-04-04 at 11:09, Luke Palmer wrote: On Thu, 4 Apr 2002, James Ryley wrote: How 'bout: $foo = 'def'; $bar = 'ghi'; $y = 'abc$foo$bar'; $z = eval qq{$y}; Of course, for security and correctness reasons, you'd probably want to: $y =~ s/\\//g; $y =~ s/!/\\/g; Why

Re:http://archive.develooper.com/perl6-announce-rfc@perl.org/msg00318.html

2002-04-05 Thread Aaron Sherman
On Fri, 2002-04-05 at 09:30, Luke Palmer wrote: On 4 Apr 2002, Aaron Sherman wrote: $z = interpolate interpolate $y; Then you have ultimate control. Uhm, I disagree. I think you really get ultimate control _without_ interpolate. Some people might want to make \\t interpolate

Re: Bracekets

2002-04-08 Thread Aaron Sherman
On Mon, 2002-04-08 at 13:01, Jonathan E. Paton wrote: I'm I beating this point to death, or do I have to write the RPC: Keep the {} and [] notation for hashes and arrays or Save our array! Let's boil this RFC down to one short phrase: If {} goes away in Perl6, then everything you've

Re: Bracekets

2002-04-08 Thread Aaron Sherman
On Mon, 2002-04-08 at 14:56, Piers Cawley wrote: Aaron Sherman [EMAIL PROTECTED] writes: Also, just wondering: $_[_][EMAIL PROTECTED] _=_0_-_ does that work the way I expect it to? Dunno, what do you expect it to do?. To my way of thinking there's going to be a syntax error

Re: Bracekets

2002-04-08 Thread Aaron Sherman
On Mon, 2002-04-08 at 15:09, Mark J. Reed wrote: On Mon, Apr 08, 2002 at 07:56:11PM +0100, Piers Cawley wrote: Also, just wondering: $_[_][EMAIL PROTECTED] _=_0_-_ does that work the way I expect it to? Dunno, what do you expect it to do?. To my way of thinking there's

Re: Bracekets

2002-04-08 Thread Aaron Sherman
On Mon, 2002-04-08 at 15:12, Piers Cawley wrote: Mark J. Reed [EMAIL PROTECTED] writes: On Mon, Apr 08, 2002 at 07:56:11PM +0100, Piers Cawley wrote: $_[_][EMAIL PROTECTED] _=_0_-_ $_.[_()] _ @_._() _= _0_() - _() [...] This is where my interpretation fails because the result of

Re: Bracekets

2002-04-09 Thread Aaron Sherman
On Mon, 2002-04-08 at 20:39, Larry Wall wrote: Aaron Sherman writes: : If {} goes away in Perl6, then everything you've heard about Perl6 being : not really all that different from Perl5 is either a lie or a damned : lie. People keep saying it's just Perl5, but instead of syntax X, you

Re: I'll show you mine...

2002-04-10 Thread Aaron Sherman
On Wed, 2002-04-10 at 10:03, Piers Cawley wrote: In message [EMAIL PROTECTED], I wrote: [ A huge wodge of possible perl 6 code ] I'm getting that Warnock's Dilemma feeling here... Did I stun you all into silence? On my clock, your original message arrived at 04:23, and your followup at

Re: Defaulting params

2002-04-11 Thread Aaron Sherman
On Thu, 2002-04-11 at 00:47, Damian Conway wrote: sub load_data ($filename) { load_data($filename, 1) } sub load_data ($filename, $version) {...} Interesting. This brings goto to mind. Above, I could just assume that inlining will happen, but what about goto? Obviously: sub

Re: Unary dot

2002-04-11 Thread Aaron Sherman
On Thu, 2002-04-11 at 00:42, Luke Palmer wrote: Ah, but I think the mnemonic value of the '.' more than earns its keep here. Cour $foo is private is doing a slightly different job anyway. And instance variables are *not* the same as 'normal' variables, they hang off a different symbol

Re: Defaulting params

2002-04-11 Thread Aaron Sherman
On Thu, 2002-04-11 at 09:59, Ariel Scolnicov wrote: [Apologies to Aaron Sherman, who gets this twice due to my dunderheadedness] No problem. I usually reply to the person and CC the list because some folks have filters that will make discussions easier if I'm replying to them vs. sending just

Re: Unary dot

2002-04-11 Thread Aaron Sherman
On Thu, 2002-04-11 at 11:49, Larry Wall wrote: Aaron Sherman writes: : This should not be allowed. Well, that depends on what you mean by this. :-) [...] : In Perl5 C$object{instancevar} = 7 is just frowned on. In Perl6, I : thought we had agreed that it would flat out be impossible

Re: Defaulting params

2002-04-11 Thread Aaron Sherman
On Thu, 2002-04-11 at 11:55, Aaron Sherman wrote: 1. The first default marks the beginning of optional parameters. 2. An optional parameter with no default will automatically default to undef. Interestingly, I just said something that I did not mean to, but it opens up an interesting avenue

Re: Defaulting params

2002-04-11 Thread Aaron Sherman
On Thu, 2002-04-11 at 12:44, Luke Palmer wrote: class myobj { ... int a,b,c; myobj(int aa, int bb, int cc) : a(aa), b(bb), c(cc) const {} ... }; Ummm no. Straight from Bjarne: You can't have a const

Re: Defaulting params

2002-04-11 Thread Aaron Sherman
On Thu, 2002-04-11 at 14:34, Larry Wall wrote: Miko O'Sullivan writes: : Well, I had been hoping to appeal to the mathematical mindset of the list, : but there is a second reason for = in addition to / /=: it's simpler to : understand. I just think that the potential Perl hackers will

Re: How to default? (was Unary dot)

2002-04-12 Thread Aaron Sherman
On Fri, 2002-04-12 at 04:26, Piers Cawley wrote: Trey Harris [EMAIL PROTECTED] writes: I think I've missed something, even after poring over the archives for some hours looking for the answer. How does one write defaulting subroutines a la builtins like print() and chomp()? Assume the

Re: Defaulting params

2002-04-12 Thread Aaron Sherman
On Fri, 2002-04-12 at 00:37, Melvin Smith wrote: At 04:03 PM 4/11/2002 -0400, Aaron Sherman wrote: Notice that we have two different types of defaulting here. The second argument is the file to work on, and we set it to a reasonable default if it is undefined for whatever reason. However

Re: How to default? (was Unary dot)

2002-04-12 Thread Aaron Sherman
On Fri, 2002-04-12 at 09:52, Jonathan Scott Duff wrote: On Fri, Apr 12, 2002 at 09:40:16AM -0400, Aaron Sherman wrote: sub printRec() { printRec($_) } # No args, therefore no new topic. sub printRec($rec) { .chomp; print :$rec:\n } # 1 arg I think was he was saying

Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Aaron Sherman
In this example: %hash = ($a=$b); $a can be anything. In fact, since Perl6 promises to retain the original value of $a, we're rather encouraged to store complex data there. But, this poses a problem. The key to use for hashing might not ideally be the string representation. For

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Aaron Sherman
On Tue, 2002-04-16 at 14:00, Mike Lambert wrote: Speaking of which, how do we ensure the immutability of keys being put into the hash? I think Perl copied the string, so that: $b = aa; $a{$b} = 1; chop $b; print $a{aa}; still works. If we start storing full thingies into the keys of

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Aaron Sherman
On Tue, 2002-04-16 at 14:57, Piers Cawley wrote: Aaron Sherman [EMAIL PROTECTED] writes: I suspect it would involve: 1. Copying the key (which might be a reference) on insertion. 2. Hashing once, and caching the hash. This means a minimum of overhead, so it's a good thing. It also

Re: Cfor loop variations

2002-04-17 Thread Aaron Sherman
On Wed, 2002-04-17 at 11:23, Jonathan Scott Duff wrote: On Wed, Apr 17, 2002 at 01:38:59PM +0100, Piers Cawley wrote: I've got the horrible feeling that doing it this way will lead to nasty ambiguities in parsing, but if that's not the case then I must confess that I prefer this syntax.

Re: Please rename 'but' to 'has'.

2002-04-22 Thread Aaron Sherman
On Sun, 2002-04-21 at 10:59, Trey Harris wrote: 0 has true my first reaction would be, huh? Since when? Dare I say... now? ;-) Sorry, someone had to say it. Personally, even though it sucks up namespace, I think what we're seeing here is a need for more than one keyword that are

RE: Regex and Matched Delimiters

2002-04-22 Thread Aaron Sherman
On Sat, 2002-04-20 at 05:06, Mike Lambert wrote: He then went on to describe something I didn't understand at all. Sorry. Few corrections to what you wrote: To avoid the problem of extending {} to support new features with a character 'x', without breaking stuff that might have an 'x'

Re: Regex and Matched Delimiters

2002-04-22 Thread Aaron Sherman
On Sat, 2002-04-20 at 14:33, Me wrote: [2c. What about ( data) or (ops data) normally means non-capturing, ($2 data) captures into $2, ($foo data) captures into $foo?] Very nice (but, I assume you meant {$foo data})! This does add another special case to the regexp parser's handling of $, but

Re: Regex and Matched Delimiters

2002-04-22 Thread Aaron Sherman
On Mon, 2002-04-22 at 14:18, Me wrote: Very nice (but, I assume you meant {$foo data})! I didn't mean that (even if I should have). Aiui, Mike's final suggestion was that parens end up doing all the (ops data) tricks, and braces are used purely to do code insertions. (I really liked

Re: Please rename 'but' to 'has'.

2002-04-23 Thread Aaron Sherman
On Mon, 2002-04-22 at 19:22, Larry Wall wrote: Perl 6 will try to avoid synonyms but make it easy to declare them. At worst it would be something like: my sub operator:now ($a,$b) is inline { $a but $b } I see your point, and it makes sense, but how will precedence work? What would

Re: Regex and Matched Delimiters

2002-04-23 Thread Aaron Sherman
On Mon, 2002-04-22 at 21:53, Larry Wall wrote: * Parens always capture. * Braces are always closures. * Square brackets are always character classes. * Angle brackets are always metasyntax (along with backslash). So a first whack at the differences might be: [...]

Re: Regex and Matched Delimiters

2002-04-23 Thread Aaron Sherman
On Tue, 2002-04-23 at 04:32, Ariel Scolnicov wrote: Larry Wall [EMAIL PROTECTED] writes: [...] /pat/x /pat/ How do I do a no /x? I know that commented /x'ed regexps are easier reading (I even write them myself, I swear I do!), but having to escape whitespace is often

Re: Regex and Matched Delimiters

2002-04-23 Thread Aaron Sherman
On Tue, 2002-04-23 at 12:48, Larry Wall wrote: Brent Dax writes: : # \talso tab : # \nalso lf or nl (latter matching : logical newline) : # \ralso cr : # \falso ff : # \a

Re: Loop controls

2002-04-26 Thread Aaron Sherman
On Thu, 2002-04-25 at 18:20, Damian Conway wrote: Miko O'Sullivan wrote: before { ... } # run before first iteration, # only if there is at least one iteration Larry is still considering allowing a CFIRST block that would do this. [...] This will be called a

Re: Loop controls

2002-04-26 Thread Aaron Sherman
On Fri, 2002-04-26 at 14:11, Allison Randal wrote: On Fri, Apr 26, 2002 at 08:49:23AM +1000, Damian Conway wrote: Hmmm... how about: for $results.get_next() { print $_; LAST { print Done.; } ELSE { print No results.; } } The else of a loop construct isn't really the same as the

Re: Loop controls

2002-04-29 Thread Aaron Sherman
On Fri, 2002-04-26 at 19:06, Allison Randal wrote: On Fri, Apr 26, 2002 at 05:24:13PM -0400, Aaron Sherman wrote: Of course it brings other less wholesome things to mind like elsfor and elsloop and if ... elsfor and for ... elsif ... elsloop ... else, but why not? Urk. And why

Re: Loop controls

2002-04-29 Thread Aaron Sherman
On Fri, 2002-04-26 at 19:30, Miko O'Sullivan wrote: Of course it brings other less wholesome things to mind like elsfor and elsloop and if ... elsfor and for ... elsif ... elsloop ... else, but why not? Well, I agree with the concept, but boyoboy those names ain't gonna fly.

Re: Loop controls

2002-04-29 Thread Aaron Sherman
On Sat, 2002-04-27 at 01:14, Luke Palmer wrote: On Fri, 26 Apr 2002, Allison Randal wrote: Besides, I would expect an Celsfor to actually be a loop of it's own, on the principle of elsif = else + if so elsfor = else + for. So, you're suggesting we add Celsunless then? Just because it's

Re: Loop controls

2002-04-29 Thread Aaron Sherman
On Mon, 2002-04-29 at 10:41, Jonathan Scott Duff wrote: On Mon, Apr 29, 2002 at 10:26:26AM -0400, Aaron Sherman wrote: I would expect that to be elsuntil, but as we're dropping until from the language, it's a moot point. Er, what?!? Who said we're dropping until? Did I miss something

Re: Loop controls

2002-04-29 Thread Aaron Sherman
On Sat, 2002-04-27 at 08:53, Damian Conway wrote: Which I presume was that the proposed usage: while $result.get_next() - $next { # do something with $next... ELSE { if $next eq xyz572 { print We defined this value, $next, as false for

Re: Loop controls

2002-04-29 Thread Aaron Sherman
On Mon, 2002-04-29 at 15:46, Miko O'Sullivan wrote: Well, if there's no while (replaced by generic loop, per Apoc4) why would there be an until? Whoa. I actually had a moment of panic there. Then I checked for myself. I don't see anything in Apoc4 about getting rid of while. It may be

Re: Loop controls

2002-04-29 Thread Aaron Sherman
On Mon, 2002-04-29 at 15:54, Jonathan Scott Duff wrote: On Mon, Apr 29, 2002 at 03:30:40PM -0400, Aaron Sherman wrote: On Mon, 2002-04-29 at 10:41, Jonathan Scott Duff wrote: On Mon, Apr 29, 2002 at 10:26:26AM -0400, Aaron Sherman wrote: I would expect that to be elsuntil, but as we're

Re: Loop controls

2002-04-29 Thread Aaron Sherman
On Mon, 2002-04-29 at 16:41, Luke Palmer wrote: So, the answer to your question is: yes, I do propose that there should be an elsif, elsloop and elsfor. That's it. Three words, not an expansive list of ever-more-complex words. Oh! I have an idea! Why don't we make the lexer just realize

Re: Loop controls

2002-04-30 Thread Aaron Sherman
On Tue, 2002-04-30 at 13:07, Miko O'Sullivan wrote: Damian, now having terrible visions of someone suggesting Celswhen ;-) Then may I also give you nightmares on: elsdo, elsdont, elsgrep, elstry ... Aaron, trying hard not to be a crackpot, but getting the impression that's now just a dream

Re: Loop controls

2002-05-01 Thread Aaron Sherman
On Wed, 2002-05-01 at 08:27, Miko O'Sullivan wrote: Damian said: 6. Cotherwise would seem to fit the bill rather nicely. To me, otherwise is a synonym for else, and that makes it too confusingly similar. I foresee forever explaining to people the difference between Celse and

Re: Loop controls

2002-05-01 Thread Aaron Sherman
On Wed, 2002-05-01 at 12:22, Allison Randal wrote: On Wed, May 01, 2002 at 09:03:42AM -0500, Jonathan Scott Duff wrote: [... in python ...] while_stmt ::= while expression : suite [else : suite] That's straight from

Re: Loop controls

2002-05-01 Thread Aaron Sherman
I now realize that my previous message was a little hard to read (plus I sounded a bit harsh, which I did not mean to be, I was just excited, thinking about this), because I insisted on being sort of stilted in my pseudo-BNF. Here's a cleaner shot at what I meant: flow:

Re: Loop controls

2002-05-02 Thread Aaron Sherman
On Wed, 2002-05-01 at 18:47, Damien Neil wrote: On Wednesday, May 1, 2002, at 02:27 PM, Aaron Sherman wrote: unless my $fh = $x.open { die Cannot open $x: $!; } else while $fh.getline - $_ { print; } else { die No lines to read in $x

Re: Perl (well, Parrot) Internals QA

2002-05-07 Thread Aaron Sherman
On Mon, 2002-05-06 at 16:26, Dan Sugalski wrote: I forgot to announce the call for questions here (sorry), but the answers 9and the questions) to the first round of Ask The Parrot have been posted over on use.perl. http://use.perl.org/article.pl?sid=02/05/06/179233 for the interested.

RE: Loop controls

2002-05-07 Thread Aaron Sherman
On Mon, 2002-05-06 at 14:21, David Whipp wrote: Miko O'Sullivan [mailto:[EMAIL PROTECTED]] wrote: Sorry, I thought I'd expressed agreement at some point. I like the else\s+(if|while|for|loop) construct very much, and I think the programmers of the world would like it too. I know a some

Re: What does this do?

2002-05-07 Thread Aaron Sherman
On Fri, 2002-05-03 at 12:37, Larry Wall wrote: Piers Cawley writes: : Consider the following. : :sub foo {...} : :foo *@ary; :foo * ary; : : Is this another place where whitespace will have meaning? Or should I : add parentheses to disambiguate? Enquiring minds want to

RE: FIRST, BETWEEN, etc.. (was Re: Loop controls)

2002-05-09 Thread Aaron Sherman
On Thu, 2002-05-09 at 13:22, David Whipp wrote: Aaron Sherman [mailto:[EMAIL PROTECTED]] wrote: what about while (do_something_with_side_effects_and_check_still_ok()) { I presume we don't want to do look-ahead here. Yes, I think he was saying exactly that we will do

Re: Accessor methods ?

2002-05-09 Thread Aaron Sherman
On Thu, 2002-05-09 at 12:37, David Wheeler wrote: On 5/8/02 1:24 PM, Damian Conway [EMAIL PROTECTED] claimed: Yes. If you write: class Foo { my $.bar; my $.baz is public; ... } you get a private C.bar() accessor and a public C.baz accessor. What if I want my

Re: Accessor methods ?

2002-05-10 Thread Aaron Sherman
On Fri, 2002-05-10 at 00:27, Damian Conway wrote: Aaron Sherman wrote: What if I want my methods to be called C.get_bar() and C.set_bar(), since a certain Perl OO specialist suggests this approach is best for avoiding ambiguity in one's API? Then you can declare them

Re: FIRST, BETWEEN, etc.. (was Re: Loop controls)

2002-05-15 Thread Aaron Sherman
On Sun, 2002-05-12 at 15:43, Miko O'Sullivan wrote: From: David Whipp [EMAIL PROTECTED] It it too much to ask, of the creator of a tied array, to implement their code in such a way that *reading* an element of that array does not have significant side-effects? Actually, I think that

Re: Accessor methods ?

2002-05-15 Thread Aaron Sherman
On Sat, 2002-05-11 at 17:43, Damian Conway wrote: Paul Johnson wrote: I've always found the word like to be very wishy-washy in a computer langauge. In what way is newbaz like baz? And just how alike are they? There must be a better way to describe this. Perhaps: method

Re: Accessor methods ?

2002-05-15 Thread Aaron Sherman
On Fri, 2002-05-10 at 21:42, Damian Conway wrote: Wouldn't those be the same? Not quite. C$.bar is a direct access to the attribute. C.bar is a call to the accessor. There might well be performance issues. I would expect that there won't be, but perhaps I'm optimistically over-hyping

Re: stringification of objects, subroutine refs

2002-05-15 Thread Aaron Sherman
On Sat, 2002-05-11 at 00:39, Dan Sugalski wrote: At 8:58 PM -0700 5/10/02, [EMAIL PROTECTED] wrote: I was wondering how perl6 would stringify (as in Data::Dumper): That's not stringification. It's serialization, which is a different thing entirely. What you'll potentially get is a thing

Re: Selective exporting of properties/methods

2002-05-15 Thread Aaron Sherman
On Sat, 2002-05-11 at 13:58, Chris Dutton wrote: method world is public_to(Bar) { Might as well make that: method world is private(Bar) I tend to take any opportunity to recycle syntax, plus keywords with underscores give me gas. ;)

Re: Why not {,n} in quantifiers?

2002-05-15 Thread Aaron Sherman
On Tue, 2002-05-14 at 20:13, Larry Wall wrote: It's unlikely that {n,m} will still have that meaning in Perl 6. Maybe we'll have something like this: Perl 5Perl 6 {1,3} 1..3 {3} 3 {3,} 3+ {0,3} 3- Then again, maybe not... Hopefully

Re: Accessor methods ?

2002-05-15 Thread Aaron Sherman
On Wed, 2002-05-15 at 10:36, Dan Sugalski wrote: At 10:04 AM -0400 5/15/02, Aaron Sherman wrote: On Fri, 2002-05-10 at 21:42, Damian Conway wrote: Wouldn't those be the same? Not quite. C$.bar is a direct access to the attribute. C.bar is a call to the accessor. There might well

Re: Methods, and such

2002-05-16 Thread Aaron Sherman
On Wed, 2002-05-15 at 21:38, root wrote: I've always liked how VB allowed you to define instance methods. Basically a more elegant way of doing callbacks, plus allows some structure within your callbacks. Will Perl6 allow this (Perl5 sortof did, but since the bless way of doing things is

RE: FIRST, BETWEEN, etc.. (was Re: Loop controls)

2002-05-16 Thread Aaron Sherman
On Thu, 2002-05-16 at 16:13, David Whipp wrote: Aaron Sherman [mailto:[EMAIL PROTECTED]] wrote: You might not be able to REASONABLY get a length, so you return undef. In your documentation, you advise users not to take the length, but just dive right in and fetch the element you want, e.g

Re: Accessor methods ?

2002-05-16 Thread Aaron Sherman
On Thu, 2002-05-16 at 16:07, Mike Lambert wrote: Languages like perl can't easily be inlined, since subs may be redefined at any time. If a sub's a leaf sub you can detect changes before calling safely, but if it's not a leaf sub you run into the potential issue of having the sub

Re: Accessor methods ?

2002-05-21 Thread Aaron Sherman
On Mon, 2002-05-20 at 00:27, Larry Wall wrote: Aaron Sherman writes: : Alternately, I think we should be able to mark subs as 'final' or 'inline' : to indicate our guarantee that they won't be modified. Of course, it'll : conflict with auto memoizing or auto currying modules that'd want

Re: Backslashes

2002-05-21 Thread Aaron Sherman
On Tue, 2002-05-21 at 12:57, Michael G Schwern wrote: Here's an easier one: backslash followed by the delimiter is that thing. Everything else is literal. print 'c:\it\'s\easier\to\write\win32\paths\this\way'; print q{this is ok { and so is \} } C:\this }; I desire you print your

RFC261 in Perl 5 and where it needs Perl 6 support

2002-06-06 Thread Aaron Sherman
Larry discounted RFC261 in A5, but I think there's some good in it. The biggest problem is not that it's hard to do in Perl6, but that 80-90% of it is ALREADY done in Perl5! Once you peel away that portion of the RFC, you get to Perl5's limitations and what Perl6 might do to support these

  1   2   3   4   5   6   >