psss...I want to move from Perl to Python

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Jan 29 17:21:31 EST 2016


Random832 wrote:
> The main source of confusion is that $foo[5] is an element of @foo.
> $foo{'x'} is an element of %foo. Both of these have absolutely nothing
> to do with $foo.

And this is where Perl seems totally insane to me. Obviously
it knows from the square brackets that foo[5] is referring
to the array called foo rather than the scalar called foo
or the hash called foo. So what purpose do the sigils serve,
other than provide you with the opportunity to use the
wrong one?

I know there's probably an answer to that question, but
the point is that it *looks* screwy to someone coming from
any other language on the planet.

I'm glad I learned Python first so I didn't have to
unlearn stuff like that. Was it Dijkstra who complained
about students whose minds had been damaged by BASIC?
Perl damage must be ten times worse...

-- 
Greg



More information about the Python-list mailing list