Re: very basic type checking

2010-06-30 Thread Darren Duncan
Moritz Lenz wrote: But I fear that optimizations are a risky business, considering our rather low test coverage (and considering that we don't really know how much of our code paths are actually covered by tests). In that case, perhaps Rakudo should have a config or compile-time (of Rakudo it

Re: very basic type checking

2010-06-25 Thread Moritz Lenz
Hi, Am 23.06.2010 13:59, schrieb Hiroki Horiuchi: I asked the same question to #perl6. But now I think it was a wrong place. no, you had the bad luck of asking at a time when nobody was around. My question is: In current Rakudo, my Int $i = '123'; causes a runtime error, not a compile time e

Re: very basic type checking

2010-06-24 Thread Darren Duncan
yary wrote: Yes but- the OP wasn't asking about my Str $s; my Int $i=$s; not failing at compile time, the question was about my Int $i='abc'; or how about sub square(Int $n='o hai'); Would it be wrong for the "cut-off point" be after an immediate assignment/ declaration of a built-in type to

Re: very basic type checking

2010-06-24 Thread yary
On Thu, Jun 24, 2010 at 12:08 AM, Jan Ingvoldstad wrote: > On Wed, Jun 23, 2010 at 20:21, Darren Duncan >wrote: > > > If all invocations of myop use a code literal for the $y argument, then > > this can be checked at compile time, but if the argument is a variable, > they > > have to look further

Re: very basic type checking

2010-06-24 Thread Jan Ingvoldstad
On Wed, Jun 23, 2010 at 20:21, Darren Duncan wrote: > If all invocations of myop use a code literal for the $y argument, then > this can be checked at compile time, but if the argument is a variable, they > have to look further out. > > Yup. For those who don't quite see what this leads to, consi

Re: very basic type checking

2010-06-23 Thread Darren Duncan
Hiroki Horiuchi wrote: My question is: In current Rakudo, my Int $i = '123'; causes a runtime error, not a compile time error. How about in future Perl 6? Generally speaking, in a dynamic language like Perl 6, one has to do the type checking at runtime anyway, because we don't always have the

very basic type checking

2010-06-23 Thread Hiroki Horiuchi
Hello. I asked the same question to #perl6. But now I think it was a wrong place. My question is: In current Rakudo, my Int $i = '123'; causes a runtime error, not a compile time error. How about in future Perl 6? -- Hiroki Horiuchi