5 msΒ·
There's definitely a lot of very interesting stuff in Perl 6, but sadly, I can only get all too well where you're coming from: aside from adding a lot of visua
by dreamweapon 12y ago
There's definitely a lot of very interesting stuff in Perl 6, but sadly, I can only get all too well where you're coming from: aside from adding a lot of visual clutter (which does matter), I've come to see the overuse of sigils (in both 5 and 6) to be just wrong, conceptually. It's like they're of the biggest flaws in Perl 5 that should have been at the top of the list of stuff to get rid of.
Yet they lie at the very heart of what the language is, to many people -- to such an extent that to do without them in Perl 6 would have violated one of the key design principles from its earliest days: "Perl 6 should still be Perl."
- raiph 12y ago> overuse of sigils "Overuse" is subjective. If you are you suggesting that some use is good, can you give an example of usage you think is good and usage you think represents overuse? That said, I didn't like some specific things about use of symbols in P5 and the problems have been fixed in Perl 6. And of course there is more than one way to do it, for example this is one way to write the Ackermann function in P6 using Unicode names (symbols) for parameter/argument identifiers: proto A(Int \π, Int \π) { @[π][π] //= {} } multi A(0, Int \π) { π + 1 } multi A(1, Int \π) { π + 2 } multi A(2, Int \π) { 3 + 2 π } multi A(3, Int \π) { 5 + 8 * (2 π - 1) } multi A(Int \π, 0 ) { A(π - 1, 1) } multi A(Int \π, Int \π) { A(π - 1, A(π, π - 1)) } (Based on http://rosettacode.org/wiki/Ackermann_function#Perl_6 http://rosettacode.org/wiki/Ackermann_function#Perl_6)
- raiph 12y agoHopefully better formatting: proto A(Int \π, Int \π) { @[π][π] //= {} } multi A(0, Int \π) { π + 1 } multi A(1, Int \π) { π + 2 } multi A(2, Int \π) { 3 + 2 π } multi A(3, Int \π) { 5 + 8 * (2 π - 1) } multi A(Int \π, 0) { A(π - 1, 1) } multi A(Int \π, Int \π) { A(π - 1, A(π, π - 1)) }