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

I actually like the fact that it has different operators for numbers and strings. It somehow feels cleaner to me, this separation of contexts (contexts in the usual sense of the word, not strictly Perl contexts).

The fact that the string equivalents are all words (cmp, eq, ne, etc.) gives a useful mnemonic (strings usually contain 'words', so their operators are words), and also prevents ugliness from operator-proliferation - it's the symbol operators that usually make the code _look_ ugly and lead to claims of 'line noise'.




> It somehow feels cleaner to me, this separation of contexts (contexts in the usual sense of the word, not strictly Perl contexts).

I've made the argument that the intended type of an operation is as much a context as the amount (void/scalar/list) context. The relevant Perl 5 literature flirts with that phrasing, but Perl 6 goes much further to extend that metaphor. That has proven very useful in discussions of consistency.




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

Search: