Re: Argument Type Checking

2005-05-23 Thread Brent 'Dax' Royal-Gordon
David Storrs <[EMAIL PROTECTED]> wrote: > If so, wouldn't it make sense that 'int' is the boxed type (one less > keystroke) and 'Int' is the special case? Optimize for the common > case, and all that. Think of it as being like module names--all-lowercase modules are special (pragmata), while inte

Re: Argument Type Checking

2005-05-23 Thread David Storrs
On May 19, 2005, at 10:56 PM, Luke Palmer wrote: In general, you should probably be declaring your parameters with uppercase types, [...] Luke If so, wouldn't it make sense that 'int' is the boxed type (one less keystroke) and 'Int' is the special case? Optimize for the common case, an

Re: Argument Type Checking

2005-05-19 Thread Luke Palmer
On 5/19/05, Joshua Gatcomb <[EMAIL PROTECTED]> wrote: > All: > I was hoping the following would give me an outright error > > sub foo (Int $bar) { > say $bar; > } > foo('hello'); Fortunately you are right. > I seem to recall, probably incorrectly, that one of the differences > with int, Int,

Argument Type Checking

2005-05-19 Thread Joshua Gatcomb
All: I was hoping the following would give me an outright error sub foo (Int $bar) { say $bar; } foo('hello'); I seem to recall, probably incorrectly, that one of the differences with int, Int, and no type declaration at all is that one would happily autoconvert for you, 1 would autoconvert b