--- 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.
>
>
--- 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:
>
>
--- 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
--- 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
--- 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
--- Austin Hastings <[EMAIL PROTECTED]> wrote:
>
> --- "Mr. Nobody" <[EMAIL PROTECTED]> wrote:
> > --- Austin Hastings <[EMAIL PROTECTED]> wrote:
> > > --- Simon Cozens <[EMAIL PROTECTED]> wrote:
> > > > [EMAIL PROTECTED] (Dan
--- "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
--- 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
--- 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
--- 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
--- [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
--- 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
--- 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_
--- 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
--- 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
--- 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
--- 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
--- 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.
--- 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
--- 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
--- 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
--- 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
> 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
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]>(
24 matches
Mail list logo