Hacker News new | ask | show | jobs
by xorcist 1310 days ago
The sigil is there because Perl is made for text templating, like bash and PHP. Similar to f-strings in Python 3. Having several sigils is because Perl has language context as first order feature. It is a form of operator overloading.

I have the opposite reaction than the one you describe. Why haven't other languages picked up on contexts?

It's an elegant to solution to the fact that casts can be ambiguous in late-bound dynamically typed languages. PHP specifically can suffer from this where the automatic casting gives you a different type than you expected and no one notices because it isn't an error with dynamic types. It eliminates a class of errors.

The other things I miss most from Perl are taint mode, and Moose. Metadata for objects is such a good idea, where you can see all the traits and other properties in one place.

What I don't miss about Perl is that complex data structures are overly verbose. Multidimensional arrays and hashes are much too hard to read. Ruby did that much better.