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

2008-04-29 Thread TSa
HaloO, Daniel Ruoso wrote: hrmm... I might just be overlooking something... but... sub foo (Point $p) {...} means... $signature ~~ $capture means... Point $p := $capture[0] means... $capture[0] ~~ Point means... $capture[0].^does(Point) The thing is the .^does traverses the meta

Re: First look: Advanced Polymorphism whitepaper

2008-04-29 Thread TSa
HaloO chromatic, you 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. What is polymorphic equivalence to you? I

Re: First look: Advanced Polymorphism whitepaper

2008-04-29 Thread TSa
HaloO, Jon Lang wrote: What, if anything, is the significance of the fact that pointlike (in John's example; 'Point' in TSa's counterexample) is generic? Note that I didn't give a counterexample. I just used different syntax. Here values and types behave very similar. On the value level you

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

2008-04-29 Thread TSa
HaloO, Daniel Ruoso wrote: .^does *might* traverse the information as well as simply return true if the object says so. Let's not regard the problem of meta level interoperation for now. That is we have *one* meta level. The spec says that .^does asks this meta system. Now the meta system

The Inf type

2008-04-29 Thread TSa
John M. Dlugosz wrote: I wrote a complete treatment of Inf support. Please take a look at 24.26 Infinite on pages 116-119, and 3.11.3 Infinities on pages 26-27. I have a lot to say to that. Please give me time. Regards, TSa. -- The unavoidable price of reliability is simplicity -- C.A.R.

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

2008-04-29 Thread Daniel Ruoso
Ter, 2008-04-29 às 09:28 +0200, TSa escreveu: The thing is the .^does traverses the meta information to find the *named* concept Point. The FoxPoint in John's example doesn't have that and thus nominally fails the Point test. The idea is now to also have .^does *might* traverse the

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

2008-04-29 Thread Daniel Ruoso
Ter, 2008-04-29 às 11:54 +0200, TSa escreveu: If we are to define an operator to declare that some arbitrary object conforms to some API, I would think the following as saner... sub foo(Point $p) {...}; FoxPoint $fp = ...; $fp realises Point; foo($fp); Here the spec is quite clear

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

2008-04-29 Thread TSa
HaloO, Daniel Ruoso wrote: Not really... 'does' is a composition operation, 'realises' would be just a type annotation that doesn't change the actual composition. OK, but that is not in the spec yet. To me that is like the proposed 'like' operator but with the programmer taking full

Re: Polymorphism and Representations

2008-04-29 Thread John M. Dlugosz
Hmm, I'm not seeing the message from Daniel, just this reply. I like the idea of having a class method primitive to provide some functionality. But type matching is more complex, as you can list multiple types juxtaposed. sub foo (A B £ C ::T $param) and the actual match means does A,

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

2008-04-29 Thread TSa
HaloO, Daniel Ruoso wrote: So... class A { has $.a; method inc { $.a++ } }; $a = A.new( a = 0); $b = $a; $b.inc(); $a.inc(); say $a.a; # 2 say $b.a; # 2 Will work as expected. Depends a bit on one's expectations :) So infix:= has shallow copy semantics.

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

2008-04-29 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: HaloO, Daniel Ruoso wrote: Not really... 'does' is a composition operation, 'realises' would be just a type annotation that doesn't change the actual composition. OK, but that is not in the spec yet. To me that is like the proposed 'like'

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

2008-04-29 Thread John M. Dlugosz
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. My readings have been that = just copies the ref. Unless it's a value type or immutable which just means that

[svn:perl6-synopsis] r14539 - doc/trunk/design/syn

2008-04-29 Thread larry
Author: larry Date: Tue Apr 29 13:32:24 2008 New Revision: 14539 Modified: doc/trunk/design/syn/S05.pod Log: foo: ... is now just alternate method call syntax, use foo: 'text' for strings Modified: doc/trunk/design/syn/S05.pod

[svn:perl6-synopsis] r14540 - doc/trunk/design/syn

2008-04-29 Thread larry
Author: larry Date: Tue Apr 29 13:42:15 2008 New Revision: 14540 Modified: doc/trunk/design/syn/S05.pod Log: clarifications to previous change Modified: doc/trunk/design/syn/S05.pod == ---

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

2008-04-29 Thread Daniel Ruoso
[ 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... ] TSa wrote: BTW, is WHICH globally unique? Or is that also an implementation detail? This is not specced apparently to

Jonathan Worthington receives Perl 6 Microgrant

2008-04-29 Thread Jesse Vincent
We're pleased to announce that we've selected Jonathan Worthington as a recipient of a Perl 6 microgrant. Jonathan is one of the top contributors to Rakudo Perl 6 and has been contributing to Parrot since 2003. The grant will be for travel and accommodation to the French Perl Workshop and the

treatment of isa and inheritance

2008-04-29 Thread John M. Dlugosz
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 Think you know what “polymorphism” means? Well, the Object-Oriented textbooks have been keeping a dirty little secret from you.

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

2008-04-29 Thread Daniel Ruoso
Ter, 2008-04-29 às 14:21 +0200, TSa escreveu: Daniel Ruoso wrote: Not really... 'does' is a composition operation, 'realises' would be just a type annotation that doesn't change the actual composition. OK, but that is not in the spec yet. To me that is like the proposed 'like' operator but