Hacker News new | past | comments | ask | show | jobs | submit login

As someone that has spend significant time in Perl5, why would they use something like `$=pod`? I get that the name starts with '=' just like the pod syntax, but that doesn't mean it needs to be in the variable name. I would almost just rather that they have some sort of namespace just for 'special' variables like Python with their 'dunder' variables (i.e. double-underscore like __doc__).



I find it charming. It doesn't need to be the way that particular special variable is done, but twigils are a thing in Perl 6, and I think this is a reasonable use of them.

You still have to check the docs for the dunder variables in Python. Having the same special character convention (like __var__) doesn't magically make me aware of what they all are and what they all mean. And, I've done enough Python programming to know it's a crapshoot to google for them (just as it's a crapshoot to google for sigils and twigils in Perl). You just have to know where to look for the right docs or know who to ask for where to look for the right docs (perldoc perlvar, in the case of Perl...I assume there's something similar for Perl 6, and I don't remember what it is for Python).


There is a special namespace like that. In fact, there are several, and they are selected by placing a second specials character after the sigil.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: