introspection (and Perl 6)
Jonathan Rockway
jon at jrock.us
Wed Jan 23 15:29:05 GMT 2008
On Wed, 2008-01-23 at 15:13 +0000, David Cantrell wrote:
> On Tue, Jan 22, 2008 at 09:56:08AM -0500, Jeff Anderson wrote:
> > On Jan 22, 2008 5:49 AM, Ovid <publiustemp-londonpm at yahoo.com> wrote:
> > > In short, if people can't read the code I write, that's my fault. If
> > > they can't read the language I write in, that's their fault.
>
> I take it that you consider yourself to be reasonably competent in perl
> 5? Good, thought so. Now, what does this do, and how does it work?
>
> #:: ::-| ::-| .-. :||-:: 0-| .-| ::||-| .:|-. :||
> open(Q,$0);while(<Q>){if(/^#(.*)$/){for(split('-',$1)){$q=0;for(split){s/\|
> /:.:/xg;s/:/../g;$Q=$_?length:$_;$q+=$q?$Q:$Q*20;}print chr($q);}}}print"\n";
> #.: ::||-| .||-| :|||-| ::||-| ||-:: :|||-| .:|
It's fairly obvious, however that's beside the point. This code isn't
even using any shorthand operators other than ?: (and // instead of
m//), but you're posting it to prove that shorthand operators are
unreadable? What?
> I'm advocating a sensible compromise. Saying 'HOW' would be a
> sensible compromise.
Then say 'HOW'?
I will stick to the shorthand, though, because I like it better.
Amazingly the human brain has the capacity to remember what a few
similar-looking characters do. Notice how every Japanese person seems
to be able to distinguish between 2000 or so characters? [1] Surely you
can handle 10 operators. In both cases, it's all about context and
memorization. They use language everyday; you write Perl everyday.
Just learn 'em.
[1] http://www.csse.monash.edu.au/~jwb/jouyoukanji.html
Regards,
Jonathan Rockway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://london.pm.org/pipermail/london.pm/attachments/20080123/92fb94d4/attachment.pgp
More information about the london.pm
mailing list