introspection (and Perl 6)
David Cantrell
david at cantrell.org.uk
Wed Jan 23 16:49:58 GMT 2008
On Wed, Jan 23, 2008 at 09:29:05AM -0600, Jonathan Rockway wrote:
> It's fairly obvious, however that's beside the point.
I beg to differ. It's not obvious just from looking at it. You have to
pick it apart to figure it out.
> 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?
No, I wasn't. I was posting it to demonstrate that deliberately
obfuscatory code is a bad idea. I consider smashing punctuation
characters together instead of saying "HOW" to be obfuscatory.
> > I'm advocating a sensible compromise. Saying 'HOW' would be a
> > sensible compromise.
> I will stick to the shorthand, though, because I like it better.
I rather like chaining the ternary operator myself, but despite liking
it I *don't* do it (much) because it would be a pain in the arse for
whoever has to debug my code later. To be blunt, if you're writing perl
code for your job, then what you *like* isn't particularly important.
> Amazingly the human brain has the capacity to remember what a few
> similar-looking characters do.
Amazingly, the human brain has the capacity to get terribly confused by
subtlely different sequences of characters. Such as effect and affect,
or advice and advise, or "..^" and ".^". Yes, I'm sure that I could
figure out which it was when I saw it, but I'd rather *just read it*
instead of have to figure out what the line-noise says.
--
David Cantrell | Hero of the Information Age
You may now start misinterpreting what I just
wrote, and attacking that misinterpretation.
More information about the london.pm
mailing list