Re: coercion

2022-02-11 Thread Marcel Timmerman
ssues/3807) but unfortunately none of us has done so yet :( That issue does link to a several blog posts that explain the new coercion protocol – you might find those useful and you or anyone else might also be able to adapt them into a great doc PR. -codesections Thanks Daniel and Liz. I can t

Re: coercion

2022-02-11 Thread Daniel Sockwell
of us has done so yet :( That issue does link to a several blog posts that explain the new coercion protocol – you might find those useful and you or anyone else might also be able to adapt them into a great doc PR. -codesections

Re: coercion

2022-02-11 Thread Elizabeth Mattijsen
It is being tested in Roast, so I'd say it's not really that experimental anymore :-) > On 11 Feb 2022, at 15:20, Marcel Timmerman wrote: > > Hi, > > I stumbled over a discussion between Raku developers on > "Raku/proplem-solving" issue 227 "Coer

coercion

2022-02-11 Thread Marcel Timmerman
Hi, I stumbled over a discussion between Raku developers on "Raku/proplem-solving" issue 227 "Coercion reconsidered and unified" and I saw something interesting about coercion. Without much knowledge I started to experiment with a method called COERCE(). This ended su

Re: Coercion/type checking: manually reproduce Perl6 standards

2018-09-01 Thread Fernando Santagata
everybody, > > I'm just transferring here a StackOverflow topic > https://stackoverflow.com/questions/52117678/coercion-type-checking-manually-reproduce-perl6-standards > because what was a question over there turned immediately into a discussion > which doesn't fit into SO for

Coercion/type checking: manually reproduce Perl6 standards

2018-09-01 Thread Vadim Belman
Hi everybody, I'm just transferring here a StackOverflow topic https://stackoverflow.com/questions/52117678/coercion-type-checking-manually-reproduce-perl6-standards because what was a question over there turned immediately into a discussion which doesn't fit into SO format. Not

Re: 99 problems in Perl6: 32 and a question on number coercion

2007-01-03 Thread Steffen Schwigon
gabriele renzi <[EMAIL PROTECTED]> writes: > Steffen Schwigon ha scritto: >> I looked at [1]. What's the purpose of "multi" in this case? >> (Maybe you wanted to write it as more than one subs, did you?) > > look the comment: > > # Yet, it should be possible to define it even for commutative rings

Re: 99 problems in Perl6: 32 and a question on number coercion

2007-01-03 Thread gabriele renzi
shed. Type constraints were syntactically accepted but worked similar to typeless code in Perl5. I'm not sure about the current state. I see Anyway, in your example I hadn't expected a value coercion (from 10.1 to 10), but something like an error if the type doesn't match. this

Re: 99 problems in Perl6: 32 and a question on number coercion

2007-01-03 Thread Steffen Schwigon
ccepted but worked similar to typeless code in Perl5. I'm not sure about the current state. Anyway, in your example I hadn't expected a value coercion (from 10.1 to 10), but something like an error if the type doesn't match. But I can't find the right place in the synopses to ver

99 problems in Perl6: 32 and a question on number coercion

2007-01-02 Thread gabriele renzi
Hi everyone! I solved the (easy) problem 32, implementing gcd($a,$b). You can check the code in the repository or on the web[1] But while writing this I noticed that a function written as sub gcd(Int $a, Int $b) still accepts float/rational values in input. I think I read once that a variable