|Syntactic Confectionery Delight|
Re: Exegesis 2 - Perl 6by princepawn (Parson)
|on May 16, 2001 at 05:11 UTC||Need Help??|
My comments on the article:
like most other global punctuation variables, $/ has been banished from Perl 6I guess that means bye-bye to a lot of obfuscated Perl code. The globals really never affect most people's lives anway, except $|
(in Perl 6 -> is spelled .)Hmm, we have tons of code using ->. Also, the arrow stands out better. Whats purpose of this change? I don't like it.
The call to $node.Found would normally be a method call (in Perl 6 -> is spelled .). But since $node is just a regular unblessed hash, there is no Found method to call. So Perl treats the request as a property query instead and returns (an alias to) the corresponding property.This is an interesting fall-through property. But does it mean that execution time increases because it starts making run-time checks for methods before doing a hash lookup?
But then the serpent of OO entered the garden, and offered Perlkind the bitter fruit of subroutine and method calls: print $subref->(); print $objref->method(); Now the leading $ no longer indicated the type of value returned. And in beginners' Perl classes across the land there arose a great wailing and a gnashing of teeth.Wow, for all my efforts to detect inconsistencies in Perl, it never occurred to me that the dollar sign should by arguments of context imply a scalar return value. It was just so natural to use I never thought of how it broke that rule.
I dont believe Damian mentioned how method calls would imply the type of their return values did he? Nothing like
is on the horizon is it?