On 2017-02-13 2:11 AM, ToddAndMargo wrote:
On 02/12/2017 05:12 PM, Darren Duncan wrote:
On 2017-02-12 5:08 PM, ToddAndMargo wrote:
I presume my eyes would tell where I made the boo-boo.  Lets hope!
I am real tired of Perl 5's stone age subs declarations.  @_, oh brother.

In principle there is nothing wrong with @_ at least from the perspective that
it is quite useful to be able to have a single variable or keyword to
represent the entire argument list as a single value.  Logically, a single
value is what an entire argument list is anyway, with individual arguments
being components of that. -- Darren Duncan

Except Perl 5 is a high level language and is suppose to be
more friendly to use.  @_ is reminiscent of the difficulties
encountered with assembly code, especially having to work with
reference pointers to return array values.  (I do love arrays of
hashes.)

Perl 6 fixes this big time!  If for no other reason, this is why
I am migrating to Perl 6.  I use "subs" to death.  Totally
addicted to them and can't live without them .  And, Perl 6 makes
it easy to understand values passed to subs at a glance.  Not
to mention not having to waste time renaming $_[x] over to an
understandable name.

I think the important thing is having choice. Declaring parameters in terms of named variables is normal and important, but when one does that it would still be ideal to get a single extra variable that has all the arguments in it as components, for when it is useful. -- Darren Duncan

Reply via email to