Re: treatment of isa and inheritance

2008-04-30 Thread TSa
HaloO, just to deepen your understanding of co- and contravariance you should digest http://www.pps.jussieu.fr/~gc/papers/toplas95.pdf The important point to get from it is that dispatch-relevant parameters are also covariant. Regards, TSa. -- The unavoidable price of reliability is

Re: treatment of isa and inheritance

2008-04-30 Thread TSa
HaloO John, interesting to note that you are now nailing down things that I'm advocating for quite a while. Are you sure that Perlkind is following? E.g. $Larry hasn't written 'isa' into S12 yet. Regards, TSa. -- The unavoidable price of reliability is simplicity -- C.A.R. Hoare 1 + 2 + 3 + 4

Re: treatment of isa and inheritance

2008-04-30 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: HaloO, just to deepen your understanding of co- and contravariance you should digest http://www.pps.jussieu.fr/~gc/papers/toplas95.pdf The important point to get from it is that dispatch-relevant parameters are also covariant. Regards, TSa.

Re: treatment of isa and inheritance

2008-04-30 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: HaloO John, interesting to note that you are now nailing down things that I'm advocating for quite a while. Are you sure that Perlkind is following? E.g. $Larry hasn't written 'isa' into S12 yet. Regards, TSa. I am listening. I'm synthesizing

Re: treatment of isa and inheritance

2008-04-30 Thread TSa
HaloO, John M. Dlugosz wrote: isa as a synonym for is that turns on warnings is documented at the end of my paper under Concepts discussed in this paper that are not on the Synopses. I totally agree! Using 'isa' pulls in the type checker. Do we have the same option for 'does' e.g. 'doesa'?

Re: Pragma for type matching alternative implementations

2008-04-30 Thread John M. Dlugosz
Daniel Ruoso daniel-at-ruoso.com |Perl 6| wrote: Very interesting reading... :) It actually made me think that it would be possible to implement it as a pragma. class A { has $.a }; class B { has $.b }; sub foo { A $a } { ... } [sic, should be () around parameters] {

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

2008-04-30 Thread TSa
HaloO, Daniel Ruoso wrote: [ I'm using this message to reply, because I didn't receive your reply... I'm taking it from the list history... There really seems to be something wrong with this list... ] I see all your messages arrive twice. This is not specced apparently to leave room for

Re: treatment of isa and inheritance

2008-04-30 Thread Ovid
--- John M. Dlugosz [EMAIL PROTECTED] wrote: isa as a synonym for is that turns on warnings is documented at the end of my paper under Concepts discussed in this paper that are not on the Synopses. Nobody's objected to it. In this group, I'm preaching to the choir anyway. So, isn't isa

Re: treatment of isa and inheritance

2008-04-30 Thread TSa
HaloO, Ovid wrote: So, isn't isa and the £ merely things which can be added by programmers by changing the grammar? That was one of the design goals of the language. With a changeable grammar this applies to everything except the changeability itself. But the type system is part of the

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

2008-04-30 Thread TSa
HaloO, John M. Dlugosz wrote: TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: multi infix:= (Any $lhs, A $rhs) { $lhs.STORE($rhs.clone); # or .cow if that's not automatic } $lhs.VAR.STORE. I guess I also forgot the is rw to get a binding to the caller's container not

Pragma for type matching alternative implementations (Was: Re: treatment of isa and inheritance)

2008-04-30 Thread Daniel Ruoso
Ter, 2008-04-29 às 21:03 -0500, John M. Dlugosz escreveu: In response to questions on my whitepaper, I made this companion to bring people up to speed on the issue. http://www.dlugosz.com/Perl6/web/isa-inheritance.html Very interesting reading... :) It actually made me think that it would be

Re: treatment of isa and inheritance

2008-04-30 Thread Daniel Ruoso
Qua, 2008-04-30 às 15:55 +0200, TSa escreveu: But the type system is part of the language core. As such 'isa' and 'like' or assignment and binding semantics need a definition. Actually, this is one of the hardest parts of implementing Perl 6, because even 'isa', 'like', assignment and binding

Re: First look: Advanced Polymorphism whitepaper

2008-04-30 Thread Ovid
--- chromatic [EMAIL PROTECTED] wrote: $p1 must be like a Point, but it needn't actually be a Point. Both $p2 and the return value must be the same type of thing that $p1 is. That was always my goal for roles in the first place. I'll be a little sad if Perl 6 requires an explicit

Re: treatment of isa and inheritance

2008-04-30 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: HaloO, John M. Dlugosz wrote: isa as a synonym for is that turns on warnings is documented at the end of my paper under Concepts discussed in this paper that are not on the Synopses. I totally agree! Using 'isa' pulls in the type checker. Do

Re: treatment of isa and inheritance

2008-04-30 Thread John M. Dlugosz
Ovid publiustemp-perl6language2-at-yahoo.com |Perl 6| wrote: So, isn't isa and the £ merely things which can be added by programmers by changing the grammar? That was one of the design goals of the language. The capability needs to exist as part of the overall type system, with primitive

Re: Polymorphism and Representations

2008-04-30 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Finally combine that with the wish to allow literals of class A. Let's assume the grammar is patched to parse integer literals as As. Then with the above 7.inc gives an error because 7 is not mutable. So as I outlined before I want to care for

Re: treatment of isa and inheritance

2008-04-30 Thread Brandon S. Allbery KF8NH
On Apr 30, 2008, at 8:43 AM, TSa wrote: John M. Dlugosz wrote: isa as a synonym for is that turns on warnings is documented at the end of my paper under Concepts discussed in this paper that are not on the Synopses. I totally agree! Using 'isa' pulls in the type checker. Do we have the

Re: treatment of isa and inheritance

2008-04-30 Thread Larry Wall
On Wed, Apr 30, 2008 at 07:29:58AM -0500, John M. Dlugosz wrote: I am listening. I'm synthesizing and documenting. I'm also disappointed with the lack of feedback from Larry, considering the amount of effort and time I'm putting into it. But I'm sure he'll squawk if I say something

Re: First look: Advanced Polymorphism whitepaper

2008-04-30 Thread Daniel Ruoso
Qua, 2008-04-30 às 08:56 -0700, Ovid escreveu: I had initially thought this, but think about the case where someone wants to rewrite something to be compliant to another interface. If I pass a CGI::Simple object to a method expecting a CGI object, there's an excellent chance that it will

Re: treatment of isa and inheritance

2008-04-30 Thread Jon Lang
Brandon S. Allbery KF8NH wrote: TSa wrote: I totally agree! Using 'isa' pulls in the type checker. Do we have the same option for 'does' e.g. 'doesa'? Or is type checking always implied in role composition? Note that the class can override a role's methods at will. It occurs to me that

Re: treatment of isa and inheritance

2008-04-30 Thread James Fuller
On Wed, Apr 30, 2008 at 9:14 PM, Jon Lang [EMAIL PROTECTED] wrote: Brandon S. Allbery KF8NH wrote: TSa wrote: I totally agree! Using 'isa' pulls in the type checker. Do we have the same option for 'does' e.g. 'doesa'? Or is type checking always implied in role composition? Note

Re: treatment of isa and inheritance

2008-04-30 Thread Brandon S. Allbery KF8NH
On Apr 30, 2008, at 15:14 , Jon Lang wrote: Brandon S. Allbery KF8NH wrote: It occurs to me that this shouldn't be new keywords, but adverbs, i.e. ``is :strict Dog''. On a side note, I'd like to make a request of the Perl 6 community with regard to coding style: could we please have

Re: treatment of isa and inheritance

2008-04-30 Thread Brandon S. Allbery KF8NH
On Apr 30, 2008, at 15:14 , Jon Lang wrote: only is is :strictly Dog more legible, but it leaves room for the possible future inclusion of adjective-based syntax such as big Dog It occurs to me that we already have this: we call them types. -- brandon s. allbery

Re: treatment of isa and inheritance

2008-04-30 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: On a more fundamental level, I wonder what the social ramifications are. First, to what extent is this something that will interfere with people who don't want to learn higher-order typing in order to get their job done, but will be forced to because

Re: First look: Advanced Polymorphism whitepaper

2008-04-30 Thread John M. Dlugosz
Daniel Ruoso daniel-at-ruoso.com |Perl 6| wrote: Qua, 2008-04-30 às 08:56 -0700, Ovid escreveu: I had initially thought this, but think about the case where someone wants to rewrite something to be compliant to another interface. If I pass a CGI::Simple object to a method expecting a CGI

OK, ::?CLASS not virtual

2008-04-30 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: I don't like using ::?CLASS for something that is not a compile-time constant. ... we don't use ::?SELF anymore, but self, because that can vary in meaning dynamically OK, for some meaning of constant. After all ::?LINE is different every time you

Re: OK, ::?CLASS not virtual

2008-04-30 Thread Jon Lang
John M. Dlugosz wrote: And you can use CLASS in a role also, confidant that it will be looked up according to the normal rules when the class is composed using that role, just like any other symbol that is not found when the role is defined. Using ::?CLASS in a role is an error (unless you

Re: First look: Advanced Polymorphism whitepaper

2008-04-30 Thread chromatic
On Wednesday 30 April 2008 08:56:24 Ovid 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. I had initially

Re: First look: Advanced Polymorphism whitepaper

2008-04-30 Thread Brandon S. Allbery KF8NH
On May 1, 2008, at 0:53 , chromatic wrote: correctness sense. Sadly, both trees and dogs bark.) Hm, no. One's a noun, the other's a verb. Given the linguistic orientation of Perl6, it seems a bit strange that the syntax for both is the same: while accessors and mutators are

Re: First look: Advanced Polymorphism whitepaper

2008-04-30 Thread Jon Lang
On Wed, Apr 30, 2008 at 9:58 PM, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On May 1, 2008, at 0:53 , chromatic wrote: correctness sense. Sadly, both trees and dogs bark.) Hm, no. One's a noun, the other's a verb. Given the linguistic orientation of Perl6, it seems a bit

Re: First look: Advanced Polymorphism whitepaper

2008-04-30 Thread Brandon S. Allbery KF8NH
On May 1, 2008, at 1:30 , Jon Lang wrote: On Wed, Apr 30, 2008 at 9:58 PM, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On May 1, 2008, at 0:53 , chromatic wrote: correctness sense. Sadly, both trees and dogs bark.) Hm, no. One's a noun, the other's a verb. Given the

Re: First look: Advanced Polymorphism whitepaper

2008-04-30 Thread Larry Wall
On Thu, May 01, 2008 at 01:34:45AM -0400, Brandon S. Allbery KF8NH wrote: On May 1, 2008, at 1:30 , Jon Lang wrote: In defense of chromatic's point, both people and syrup run. But there *is* some commonality there, to the extent that both are motion. This is the kind of thing that spawned

Re: First look: Advanced Polymorphism whitepaper

2008-04-30 Thread Brandon S. Allbery KF8NH
On May 1, 2008, at 1:46 , Larry Wall wrote: On Thu, May 01, 2008 at 01:34:45AM -0400, Brandon S. Allbery KF8NH wrote: On May 1, 2008, at 1:30 , Jon Lang wrote: In defense of chromatic's point, both people and syrup run. But there *is* some commonality there, to the extent that both are