in reply to vec and array parameters

vec isn't the only function that 'suffers' from this. Any function that does compile time checking of the number of arguments does so. Try the same with atan2 for instance.

And a general piece of advice: to increase the changes someone actually answers your question, don't force them to cut and paste your code to see what it prints. Just include the output; that saves a lot of trouble for those who answer your query.

Abigail

Replies are listed 'Best First'.
Re: Re: vec and array parameters
by dragonchild (Archbishop) on Jan 07, 2004 at 17:45 UTC
    Are there any plans / thoughts to fixing this 'problem'? Is it even considered a problem or is it just an annoyance?

    ------
    We are the carpenters and bricklayers of the Information Age.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      It's just a result of perl's context coercive prototypes. You may consider it an annoyance if you like. The fix is Perl 6 :-)

      The only time this is mentioned as a problem is when people are discussing prototypes once a year. But then, people quickly agree that prototypes are a failed experiment, with only one or two somewhat useful cases, but it's too late to do it differently. I've never seen it be considered a real problem for primitives like vec. (More often than not, people will use the same third argument for vec, and use a constant).

      Abigail