Re: Shortcut: ?=

2003-02-02 Thread Mr. Nobody
--- Miko O'Sullivan <[EMAIL PROTECTED]> wrote: > SUMMARY > > C<$var ?= $x : $y> as a shortcut for C<$var = $var ? $x : $y>. > > > DETAILS > > We have ||=, +=, -=, etc. These shortcuts (I'm sure there's some fancy > linguistic term for them) save us a few keystrokes and clean up the code. > >

Re: L2R/R2L syntax

2003-01-19 Thread Mr. Nobody
--- Sean O'Rourke <[EMAIL PROTECTED]> wrote: > On Sat, 18 Jan 2003, Michael Lazzaro wrote: > > So 'if' and friends are just (native) subroutines with prototypes like: > > > >sub if (bool $c, Code $if_block) {...}; > > IIRC it's not that pretty, unfortunately, if you want to support this: > >

Re: L2R/R2L syntax

2003-01-17 Thread Mr. Nobody
--- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > On Friday, January 17, 2003, at 11:00 AM, Simon Cozens wrote: > > [EMAIL PROTECTED] (Michael Lazzaro) writes: > >> ...the absence of the commas is what's special. If they were normal > >> functions/subroutines/methods/whatever, you would need a

RE: L2R/R2L syntax

2003-01-17 Thread Mr. Nobody
--- Thom Boyer <[EMAIL PROTECTED]> wrote: > Mr. Nobody [mailto:[EMAIL PROTECTED]] groused: > >I have to wonder how many people actually like this syntax, and how many > only > >say they do because it's Damian Conway who proposed it. > > Some of us like it bec

Re: L2R/R2L syntax

2003-01-17 Thread Mr. Nobody
--- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > So, to bring this thread back on track *again*, I hopefully offer this > summary. > > > 1) Damian's idea of using ~> and <~ as L2R and R2L is well-liked. Thus: > >@out = grep { ... } map { ... } @in; # (1) (perl5) > > be

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-16 Thread Mr. Nobody
--- Austin Hastings <[EMAIL PROTECTED]> wrote: > > --- "Mr. Nobody" <[EMAIL PROTECTED]> wrote: > > --- Austin Hastings <[EMAIL PROTECTED]> wrote: > > > --- Simon Cozens <[EMAIL PROTECTED]> wrote: > > > > [EMAIL PROTECTED] (Dan

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-16 Thread Mr. Nobody
--- "Mr. Nobody" <[EMAIL PROTECTED]> wrote: > --- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > Well, I don't know about anyone else, but *I'm* planning on making > > many, many Unicode synonyms, to make my code shorter and more readable. > &g

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-16 Thread Mr. Nobody
--- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > Well, I don't know about anyone else, but *I'm* planning on making > many, many Unicode synonyms, to make my code shorter and more readable. > > For example, C is too long, so I want to just make it curly-f, > (ƒ). And C is even longer, so I'm g

RE: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-16 Thread Mr. Nobody
--- Brent Dax <[EMAIL PROTECTED]> wrote: > Mr. Nobody: > # --- Austin Hastings <[EMAIL PROTECTED]> wrote: > # > It's very much like the good old days of trigraphs. But on the plus > # > side, once all the losers get their fonts/xterms/editors > # up-to-s

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-16 Thread Mr. Nobody
--- Austin Hastings <[EMAIL PROTECTED]> wrote: > --- Simon Cozens <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] (Dan Sugalski) writes: > > > Ah, that's a different question. Having Unicode synonyms may well > > be > > > considered reasonable thing > > > > Sounds like the good old days of trigra

Re: This week's Perl Summary

2003-01-14 Thread Mr. Nobody
--- [EMAIL PROTECTED] wrote: > L2R/R2L syntax > Argh! No! It's back and this time it means business. The dreaded > left->right versus right->left thing came back, and this time it was > Damian applying the electrodes to the corpse. Of course, it being > Damian > he was instantly f

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-13 Thread Mr. Nobody
--- Buddha Buck <[EMAIL PROTECTED]> wrote: > Mr. Nobody wrote: > > --- Buddha Buck <[EMAIL PROTECTED]> wrote: > > > >>Mr. Nobody wrote: > >> > >> > >>>Unicode operators in the core are a very, very, very, very, very, very, &g

RE: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-13 Thread Mr. Nobody
--- Thom Boyer <[EMAIL PROTECTED]> wrote: > Mr. Nobody <[EMAIL PROTECTED]> says: > > Unicode operators in the core are a very, very, very, very, very, very, > very, > > very, very, very, very, very, very bad idea. > > OK, now I think I know how _you_

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-13 Thread Mr. Nobody
--- Buddha Buck <[EMAIL PROTECTED]> wrote: > Mr. Nobody wrote: > > > > > Unicode operators in the core are a very, very, very, very, very, very, > very, > > very, very, very, very, very, very bad idea. > > We've already had this discussion. We wouldn

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-13 Thread Mr. Nobody
--- David Storrs <[EMAIL PROTECTED]> wrote: > On Sun, Jan 12, 2003 at 11:50:14AM +, Richard J Cox wrote: > > > > U+21DC "Leftwards Squiggle Arrow" and U+21DE "Rightwards Squiggle Arrow" > would > > seem to fit the bill rather well maybe the ascii <~ and ~> are merely > > aliases of the tru

RE: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-09 Thread Mr. Nobody
--- Thom Boyer <[EMAIL PROTECTED]> wrote: > Mr. Nobody <[EMAIL PROTECTED]> wrote: > > --- Damian Conway <[EMAIL PROTECTED]> wrote: > > > @a ~> grep {...} ~> map {...} ~> sort ~> @out; > > > > That's going to be just plain

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-09 Thread Mr. Nobody
--- Damian Conway <[EMAIL PROTECTED]> wrote: > Mr. Nobody wrote: > > > I don't like either of these operators. What's wrong with > > > > @out = sort map {...} grep {...} @a > > > > ? > > For a start, if these functions were

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-08 Thread Mr. Nobody
--- Luke Palmer <[EMAIL PROTECTED]> wrote: > > Date: Wed, 08 Jan 2003 12:14:10 +0800 > > From: Damian Conway <[EMAIL PROTECTED]> > > > > Can I suggest that an alternative solution might be the following: > > > > Suppose Perl 6 had two new very low precedence operators: ~> and <~ > > (a.

Re: Pike 7.4

2003-01-08 Thread Mr. Nobody
--- Damian Conway <[EMAIL PROTECTED]> wrote: > Chris Dutton wrote: > > > Given discussions about "hyper" operators in the past, I found this > > rather interesting in the release notes. > > > > http://pike.idonex.com/download/notes/7.4.10.xml > > Interesting, but I still feel that vectorized op

Re: Array Questions

2003-01-07 Thread Mr. Nobody
--- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > Arrays have methods: > > my int @a = (1..100); > print @a.length; # prints "100" > my @b = @a.grep { $_ > 50 }; # gets 51..100 .length is unneeded, since an array gives its length in numeric context, so you can just say

Re: "my int( 1..31 ) $var" ?

2003-01-03 Thread Mr. Nobody
--- Smylers <[EMAIL PROTECTED]> wrote: > David Storrs wrote: > > > On Fri, Jan 03, 2003 at 10:58:49AM -0800, Mr. Nobody wrote: > > > > > --- Smylers <[EMAIL PROTECTED]> wrote: > > > > > > > junction should be suffic

Re: "my int( 1..31 ) $var" ?

2003-01-03 Thread Mr. Nobody
--- Smylers <[EMAIL PROTECTED]> wrote: > Murat Ünalan wrote: > > > print "date" if $var is int( 1..31 ); > > I don't think that the type needs to be specified here, especially if > the variable has already been declared to be of the required type, so a > junction should be sufficient: > > prin

Re: Stringification of references and objects.

2002-12-06 Thread Mr. Nobody
> This is a bit of an oversimplification. $foo and @foo do not always > behave the same, even if $foo and @foo refer to the same array object. > In particular, $foo doesn't behave like @foo in a list context. > Scalars must continue to behave like scalars in list context, even > if they're interna

Suggestion for perl 6 regex syntax

2002-09-07 Thread Mr. Nobody
While Apocolypse 5 raises some good points about problems with the old regex syntax, its new syntax is actually worse than in perl 5. Most regexes, such as this one to match a C float /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/ would actually become longer: /^(<[+-]>?)\d*(\.\d*)?(<[Ee]>(