You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here comes the big question: why is the trailing comma not required when you use ï½¢myï½£?
If it is done for perl 5 compatibility (kinda), then why go half way and not introduce yet another special case for assignment without ï½¢myï½£?
Perhaps it is not possible at all due to how perl 6 parsed? If so, why introduce a pitfall by allowing it in ï½¢myï½£?
In other words, I propose these two solutions :
1. Make ï½¢($x) = …ï½£ DWIM. If not possible, see solution #2
2. Throw a compile-time warning if something like ï½¢my ($x)ï½£ is encountered (“… in Perl 6 please use a trailing comma” or something along the lines)
I've stumbled upon this problem when I was refactoring some code. Basically, I moved ï½¢myï½£ somewhere else and the code stopped working, oops! Definitely LTA.
09:24:44 <AlexDaniel> anyway, I'm submitting an RFC rakudo ticket. Feel free to throw your tomatoes at me there
09:27:25 <Xliff> AlexDaniel, if I throw anything, it will be lots in with you.
09:27:48 <Xliff> You have no idea how many hours I wasted on that (alleged) bug on my first P6 project.
This is one of those problems that we can probably solve with lots of warnings in the documentation, but why not make the language more consistent instead?
Migrated from rt.perl.org#128883 (status was 'new')
Searchable as RT128883$
The text was updated successfully, but these errors were encountered: