[Purdue-pm] Pascal's triangle
Joe Kline
gizmo at purdue.edu
Wed Aug 25 11:55:15 PDT 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bradley Andersen wrote:
> Given I have not spent any time looking at it, at first glance:
> sub pascal { [1], -> @p { [0, @p Z+ @p, 0] } ... * };
>
> troubles me greatly.
>
> That line of code is totally un-readable, and therefore completely
> useless to 95% or more of the population (that's a very scientific
> number, pulled right out of ..)
>
> People, even Larry Wall (praise be upon him), should NOT EVER code like this.
>
> \bda
I think the new meta-operators will be part of the grokking. I think
there are 3 or 4 used in that line:
- ->
Z+ (might actually count as 2 since the + is modifying the Z)
...
*
at least I think -> is a meta-operator.
I say it's only unreadable because we don't know the language.
There were vast chunks of Perl 5 that I couldn't understand.
I think why I've liked Perl is that you can have various dialects of it
or at least different fluencies and still be useful (from baby-talk Perl
all the way to crazy-insane golf Perl).
Now, should this be production code? Don't know, depends upon how well
your fellow coders know the language.
joe
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org
iD8DBQFMdWcTb0mzA2gRTpkRAtj4AJ9CY3QzSVvPy8PQUgvlY/CkTuPHHwCfar5T
3ZIZiCkxnqd8Bnj3waIu4M0=
=WYD5
-----END PGP SIGNATURE-----
More information about the Purdue-pm
mailing list