Perl's lack of 'in' keyword
Paul Makepeace
paulm at paulm.com
Thu Oct 9 11:12:39 BST 2008
On Thu, Oct 9, 2008 at 10:12 AM, Peter Corlett <abuse at cabal.org.uk> wrote:
> On Thu, Oct 09, 2008 at 12:59:37AM +0100, Paul LeoNerd Evans wrote:
> [...]
>> I suppose this is a little unfair, since my brain is sortof wired to
>> understand perl and English. Perhaps a better comparison may be
>> my $foo = $a + $b[5];
>> and
>> add scalar a to the fifth element of array b and assign to new scalar
>> foo
>
> The latter might be useful when explaining a facet of the language, but once
> you get real code, pages of it will make you want to spork your eyes out.
>
> If you don't believe me, read this:
>
> www.foo.be/docs/tpj/issues/vol5_3/tpj0503-0013.html
Elements of both sides of the argument here are leaning heavily on
extremism to make their point. Some kind of middle ground is probably
onto a winner in terms of least-annoying-to-all; what then is left is
arguing over personal preference (i.e. a bit pointless, but fun).
As an anecdotal single data point.. I've been programming Perl as my
main language since '94 and within 2yrs of exposure to python I'd say
_purely from an aesthetic point of view_ I prefer reading python. In
other words despite having 10+yrs to get used to perl, python's
appearance seems more pleasant to me. I really think it's struck a
good balance of expressiveness and language-naturalness in terms of
appearance.
(FWIW, PHP's seems like a huge mess, visually.)
P
More information about the london.pm
mailing list