4 ms·
"Every operator in Perl (not just the Range operator) has six different behaviors depending on the invisible context in which its surrounding expression is bein
by snorkel 13y ago
"Every operator in Perl (not just the Range operator) has six different behaviors depending on the invisible context in which its surrounding expression is being evaluated."
... and unfortunately context sensitivity of operators became much more prevalent in Perl 6 than Perl 5. It was hard to imagine the core Perl maintainers thought that context sensitivity was a feature that needed further enhancement, but that's just what they did in Perl 6.
Programming language design comes down to one word: teamwork. Software is collaborative writing. The better languages allow teams of developers with mixed levels of skill to work together and be productive, to build on each other's code.
Perl 5 had enough quirks and cute context idioms to be clever and interesting, yet it was still possible to decipher what other coders had intended and learn a few new tricks along the way. Perl 6 is a toolkit for outright hostile obfuscation making it damn near impossible for a team of developers to wrap their heads around each others' code. Not surprisingly Perl is fading into the past.
- berntb 13y ago>> Perl 6 is a toolkit for outright hostile obfuscation making it damn near impossible for a team of developers to wrap their heads around each others' code. Not surprisingly Perl is fading into the past. I don't know enough about Perl 6 to comment on your opinions of it. I do find it really funny when you condemn a language (Perl) based on a very different language (Perl 6). I guess you dislike C because C++ is overly complex, too...? Edit: saraid216, I don't know if you troll or have no clue? Google. Most every source you'll find emphasize that Perl/Perl 6 should be seen as different languages.
- saraid216 13y ago> (Perl) based on a very different language (Perl 6) Since when does a version increment make it a "very different language"? How is it comparable between C and C++? If anything, it's disliking C89 because of C90.
- TylerE 13y agoBecause it really is a seperate language. Going from Perl 5 to Perl 6 is like going from Algol to C++11
- perlgeek 13y ago> and unfortunately context sensitivity of operators became much more prevalent in Perl 6 than Perl 5. What makes you think so? So far I was convinced of the exact opposite. Examples: * Perl 5 has the same operator for bitwise string AND and for bitwise integer AND. Perl 6 has separate operators, reducing context sensitivity. * Perl 5's reverse() operator reverses lists in list context, and strings in scalar context. Perl 6 has separate verbs for these operations (reverse and flip), thus reducing context sensitivity * In Perl 5, context flows inwards, so operator can actually be context sensitive in the classical sense. In Perl 6, operators know nothing about their caller, thus they cannot be context sensitive in the same crazy way that some Perl 5 operators are.
- jes5199 13y agofortunately, nobody is really using Perl 6. The perl community is continuing to support and evolve perl 5 in a reasonable direction.