Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread Ovid
--- John M. Dlugosz [EMAIL PROTECTED] wrote: Here is a first look at the ideas I've worked up concerning the Perl 6 type system. It's an overview of the issues and usage of higher-order types in comparison with traditional subtyping subclasses. http://www.dlugosz.com/Perl6/ Nice paper.

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread John M. Dlugosz
Ovid publiustemp-perl6language2-at-yahoo.com |Perl 6| wrote: This might not be too big a deal, but the formatting of the code is a bit odd. It's not monospaced and the indentation and brace placement seem very arbitrary. Since these items are always code smells to me of a bad programmer[1],

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread Ovid
--- John M. Dlugosz [EMAIL PROTECTED] wrote: If the braces and positioning is funny, I wonder if it's a rendering thing. I'm using Windows and have the fonts. Could you post a screen shot and point out what's inconsistent? I see that a large part of this is that we have significantly

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread Jon Lang
John M. Dlugosz wrote: Here is a first look at the ideas I've worked up concerning the Perl 6 type system. It's an overview of the issues and usage of higher-order types in comparison with traditional subtyping subclasses. http://www.dlugosz.com/Perl6/ Very interesting, if puzzling, read.

Re: Decrement of Numbers in Strings (Was: [svn:perl6-synopsis] r14460 - doc/trunk/design/syn)

2008-04-28 Thread TSa
HaloO, John M. Dlugosz wrote: Huh? if you call $q = aaa; incr($q); then the value passed in is a Str. The static type is Any, the dynamic type is Str. Sorry, I got that messed up. The ::Type captures the dynamic type of the value, of course. But I want to get at the constraint of the

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread TSa
HaloO, Jon Lang wrote: I'm having some difficulty understanding the business with £. I _think_ that you're saying that £ sort of acts as a prefix operator that changes the meaning of the type with which it is associated; and the only time that a change in meaning occurs is if the type in

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread Jon Lang
TSa wrote: The use of £ in sub foo (£ pointlike ::PointType $p1, PointType $p2 -- PointType) is that of *structural* subtyping. Here FoxPoint is found to be pointlike. In that I would propose again to take the 'like' operator from JavaScript 2. Doing that the role should be better

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread John M. Dlugosz
Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: I'm having some difficulty understanding the business with £. I _think_ that you're saying that £ sort of acts as a prefix operator that changes the meaning of the type with which it is associated; and the only time that a change in meaning

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread Jon Lang
chromatic wrote: Jon Lang wrote: Ah; that clears things up considerably. If I understand you correctly, John is using '£' to mean use Duck Typing here. _That_, I can definitely see uses for. As well, spelling it as 'like' instead of '£' is _much_ more readable. With this in mind,

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: HaloO, Jon Lang wrote: I'm having some difficulty understanding the business with £. I _think_ that you're saying that £ sort of acts as a prefix operator that changes the meaning of the type with which it is associated; and the only time that

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread Jon Lang
John M. Dlugosz wrote: TSa wrote: Jon Lang wrote: I'm having some difficulty understanding the business with £. I _think_ that you're saying that £ sort of acts as a prefix operator that changes the meaning of the type with which it is associated; and the only time that a change in

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread John M. Dlugosz
Andy_Bach-at-wiwb.uscourts.gov |Perl 6| wrote: Just an even simpler question: sub bendit (£ IBend ::T $p --T) { T $q = get_something; Does the T ... usage then scope the var so no 'my/our' is needed? a --- Andy Bach Systems Mangler Internet: [EMAIL PROTECTED] Voice:

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread John M. Dlugosz
Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: Ah; that clears things up considerably. If I understand you correctly, John is using '£' to mean use Duck Typing here. _That_, I can definitely see uses for. As well, spelling it as 'like' instead of '£' is _much_ more readable. With this in

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread John M. Dlugosz
chromatic chromatic-at-wgz.org |Perl 6| wrote: That was always my goal for roles in the first place. I'll be a little sad if Perl 6 requires an explicit notation to behave correctly here -- that is, if the default check is for subtyping, not polymorphic equivalence. -- c Perhaps the

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread John M. Dlugosz
Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: Perhaps it would be clearer if you could illustrate the difference between sub bendit (£ IBend ::T $p --T) { T $q = get_something; my T $result= $p.merge($q); return $result; } and sub bendit (IBend ::T $p --T)

Polymorphism and Representations (Was: Re: First look: Advanced Polymorphism whitepaper)

2008-04-28 Thread Daniel Ruoso
Seg, 2008-04-28 às 10:15 -0700, Jon Lang escreveu: Ah; that clears things up considerably. If I understand you correctly, John is using '£' to mean use Duck Typing here. _That_, I can definitely see uses for. hrmm... I might just be overlooking something... but... sub foo (Point $p) {...}

Re: First look: Advanced Polymorphism whitepaper

2008-04-28 Thread John M. Dlugosz
Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: John M. Dlugosz wrote: I think I see another whitepaper in my immediate future. I look forward to it. I'll put a link to it on http://www.dlugosz.com/Perl6/, perhaps even before I'm finished with it. --John