Perl is worse!

Alex Martelli alex at magenta.com
Fri Jul 28 11:49:02 EDT 2000


"Grant Edwards" <ge at nowhere.none> wrote in message
news:KPgg5.2640$6E.682060 at ptah.visi.com...
> In article <8lrt2h013fp at news2.newsguy.com>, Alex Martelli wrote:
> >
> >> whereas 1 + "foo" is meaningless to almost everyone except Perl coders.
> >
> >No way -- it's perfectly valid in C, too, except that there it means the
> >constant-string "oo".  Really, truly, X my heart, I kid you not, check it
> >out if you don't believe me (I wouldn't blame you for disbelieving
this!).
>
> I would assert that although 1 + "foo" is meaningful to the C
> _compiler_, it is still meaningless to almost "everyone" (as in
> people) except Perl coders, and probably meaningless to most of
> them as well.

I think you underestimate the amount of "Obfuscated C" participants
who have not been Perl coders.  1+"foo" and 1["foo"] are very
meaningful kinds of constructs to obfuscators!-)


What I don't understand is, rather...:

    $foo = ++$bar;

versus

    $foo = 1 + $bar;

How much sense can it make to have those two constructs leave
totally different values in $foo?  Yet, if $bar starts out as "foo", the
former makes $foo worth "fop", the latter makes it worth 1.  Now,
THAT is the way to let a creative obfuscator show his mettle.


Alex






More information about the Python-list mailing list