On Thu, 18 Aug 2005, Autrijus Tang wrote:

On Wed, Aug 17, 2005 at 11:45:52PM -0500, Dave Rolsky wrote:
And another question.  How will I make Perl6 not do automatic coercion for
me.  If I have this sub:

 sub date (Int +$year is required, +$month, +$day)

BTW, Pugs supports the ++ syntax, which iirc is said to be back in favour
during the Oscon design meeting:

   sub date (Int ++$year, +$month, +$day)

Uh, great, what's the syntax mean again?

It _looks_ like "+" as a prefix now means "must be passed as a name param" and "++" means must be passed as a named param and is required. Seems good to me.

You will probably get:

   1. a compile time warning of unsafe coercion, possibly made fatal.
and
   2. a NaN at runtime if you ignore the warning.

Excellent. And presumably #1 will be activated by some lexically scoped pragma like "use strict 'types'"?

Hurry up and finish. I want to use this language, darnit! And yes, I know about pugs, obviously, but for production usage I need less of a moving target ;)


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

Reply via email to