MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: [wish list]: perl stuff



Followup to:  <2.2.32.19960809164457.00717fd0@vv.com>
By author:    Quinn <quinn@vv.com>
In newsgroup: local.moo
> 
> It would be cool to have some of the anti-statements of Perl, such as
> "unless" (if-not), and "until" (while-not), because '!' just looks real ugly
> beside some things.
> 

<Grumble> I think this is just syntactic sugar...

> <TWO>
> 
> It'd also be nice to have the...
> 
>         "blah" if (foo);
> 
> thing, so people who don't wanna use three lines of code on...
> 
>         if (foo)
>           "blah";
>         endif

No PLEASE!  This is the most bogus syntactical misfeature in Perl
after unquoted literals.  If anything, it should be:

	if (foo) blah;

The reversal is just plain hideously hard to wrap a programmer's brain
around.

> 
> Somewhat Perly.  The ability to reference '[a..b]' as if it were an
> inclusive list of all integers 'a' through 'b'.  Like...
> 
>         if (foo in [5..8])
> 
> Rather than...
> 
>         if ((foo > 4) && (foo < 9))
> 

This is, by the way, hideously inefficient and would cause severe
server spam, since you are needlessly creating a list when you don't
need to.  Perl gets around this by having a pretty extensive
optimizer, but developing one for MOO would be a *lot* of work.

	-hpa
-- 
PGP public key available - finger hpa@zytor.com
Key fingerprint: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
"The earth is but one country, and mankind its citizens."  --  Bahá'u'lláh
Just Say No to Morden * The Shadows were defeated -- Babylon 5 is renewed!!


Follow-Ups: References:

Home | Subject Index | Thread Index