Re:Is Perl 6 Being Renamed?
by kbenson on Friday August 30, 2019 @01:42PM
(#20840751)
The happy-path syntax is pretty straightforward. I wonder if you're under the impression like some that you need to use the arrow syntax or prefixing dollar for every reference, and not just the first? That's not the case. e.g.
Personally, I'm happy with a single arrow that lets me know if I have a reference or not. References are important, because they denote that this data may be accessed elsewhere as well, so I'm happy to have a small reminder. Inner level references needing a bit of care if they are copied is somewhat normal though, most non-toy languages have some concept of deep or shallow copying.
[ Parent
| on HN ]
Re:Is Perl 6 Being Renamed?
by mannykannot on Wednesday September 04, 2019 @11:33AM
(#20878135)
I rest my case (it is a personal preference, anyway.)
Fair enough. I did go a little overboard in the name of completeness. IT just boils down to actually understanding what a reference is in Perl (which is something that needs to be done for anything non-amateur), and then realizing there's one -> or not depending on if it's a reference (and doing the wrong thing will fail, not do weird stuff).
Personally, I like that it forces you to be aware that this data structure is likely in use somewhere else as well, and your changes may not be local (which is true of deeper levels regardless).