|
|
|
|
|
by peelle
1511 days ago
|
|
If I understand right you are saying that the # of symbols Perl employs makes it hard to understand or read, correct? TL;DR; I would say that you assertion is context sensitive.
- For a junior Perl programmer or an outside expert those symbols are stumbling blocks.
- For an intermediate Perl programmer and up, those symbols are tools that make the code more readable and expressive. I got two ways of looking at that. First, I would look at Perl in the context of language. It is a more context sensitive language than some of it's close competitors. When you understand those \ $ % @ & sigils you gain the ability to know at a glance the context in which data is being used. Understanding @_, $_, allows you to write shorter code without sacrificing meaning. Part of the Perl philosophy is TIMTOWTDI. Most of those special variables also have an English equivalent. Instead of using $) which I never remember I can use $EGID, or if I think that's not explicit enough then I can use $EFFECTIVE_GROUP_ID to really spell it out. The second way is that Perl has a steeper learning curve than it's close competitors. I see this like comparing Vim to Notepad++ and Emacs, or Haskell to well most other functional programming languages. Just because it took longer to learn, that doesn't mean it's better or worse at creating good code. It does mean that armchair pundits are less likely to be correct in their hot takes. They lack experience and understanding. |
|
I believe sigils make string interpolations easy to support in a language. Consider JS that had to introduce an adhoc „${}“ expression to support those eventually.