How 'bout .ortho, .para? [was "Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)"]

2005-09-05 Thread Michele Dondi
(Sorry for replying _so_ late...) On Tue, 9 Aug 2005, Larry Wall wrote: I kinda like Autrijus's idea that "meta" just means "guts". In classical Greek, "meta" just means "with". The fancy philosophical meaning of "aboutness" isn't there, but is a backformation from terms such as metaphysics.

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-16 Thread Nicholas Clark
On Thu, Aug 11, 2005 at 01:35:14AM +0800, Autrijus Tang wrote: > On Wed, Aug 10, 2005 at 07:32:01PM +0200, TSa wrote: > > you wrote: > > >Perl 6 in its unannotated form is also (mostly) a typeless languages, > > >with only the five builtin types, much like Perl 5 is. > > > > Counting the sigil qua

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread TSa
HaloO, Larry Wall wrote: It might be a mistake to call these isa relationships though. I really only care about Package does Object. Module does Package. Role does Module. Class does Role. OK, I've added that and the Set type in my little type lattice. With your Object still

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread Larry Wall
On Thu, Aug 11, 2005 at 01:24:11AM +0800, Autrijus Tang wrote: : On Wed, Aug 10, 2005 at 10:12:45AM -0700, Larry Wall wrote: : > We can get away with this in Perl 6 because bindings to positionals : > happen lazily. So all we have to check for syntactically is that we : > don't have a subsequent d

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread Larry Wall
On Tue, Aug 09, 2005 at 10:54:54PM -0400, Stevan Little wrote: : Let me make sure I understand this. : : Package is an Object. : Module is a Package. : Class is a Package. : Role is a Package. I think of it more like: Package is an Object. Module is a Package. Class is a Module.

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread Brent 'Dax' Royal-Gordon
TSa <[EMAIL PROTECTED]> wrote: > you wrote: > > Perl 6 in its unannotated form is also (mostly) a typeless languages, > > with only the five builtin types, much like Perl 5 is. > > Counting the sigil quadriga as 4, what is the fifth element? > And $it.does(LookGood)? $ @ % & :: -- Brent 'Dax' R

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread Autrijus Tang
On Wed, Aug 10, 2005 at 07:32:01PM +0200, TSa wrote: > you wrote: > >Perl 6 in its unannotated form is also (mostly) a typeless languages, > >with only the five builtin types, much like Perl 5 is. > > Counting the sigil quadriga as 4, what is the fifth element? & @ $ % :: In Perl5, :: is replac

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread TSa
HaloO Autrijus, you wrote: Perl 6 in its unannotated form is also (mostly) a typeless languages, with only the five builtin types, much like Perl 5 is. Counting the sigil quadriga as 4, what is the fifth element? And $it.does(LookGood)? -- $TSa.greeting := "HaloO"; # mind the echo!

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread TSa
HaloO, Luke Palmer wrote: On 8/10/05, TSa <[EMAIL PROTECTED]> wrote: Here is an example of a 2D distance method role Point { has Num $.x; has Num $.y; } method distance( Point $a, Point $b --> Num ) { return sqrt( ($a.x - $b.x)**2 - ($a.y - $b.y)**2); } [..] # This

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread Autrijus Tang
On Wed, Aug 10, 2005 at 10:12:45AM -0700, Larry Wall wrote: > We can get away with this in Perl 6 because bindings to positionals > happen lazily. So all we have to check for syntactically is that we > don't have a subsequent declaration that changes the syntax from list > to unary (or none-ary).

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread Larry Wall
On Wed, Aug 10, 2005 at 10:47:47AM +0200, Juerd wrote: : Larry Wall skribis 2005-08-09 16:19 (-0700): : > So either something in the context tells us what "Foo" means, or : > it will be taken as a list operator that hasn't been declared yet. : : Is there, by the way, a pragma to force predeclarati

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread Luke Palmer
On 8/10/05, TSa <[EMAIL PROTECTED]> wrote: > Here is an example of a 2D distance method > >role Point >{ > has Num $.x; > has Num $.y; >} >method distance( Point $a, Point $b --> Num ) >{ > return sqrt( ($a.x - $b.x)**2 - ($a.y - $b.y)**2); >} > > Now comes

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread TSa
HaloO Stevan, you wrote: I hope that .isa, .does and .meta are normal Method subtypes and *not* slots on some implementation objects/structures. I am not sure I understand this. Can you elaborate? With pleasure! OK, where do I start? ... The origin of OO stems from the need to organize da

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread Autrijus Tang
On Wed, Aug 10, 2005 at 06:03:18AM -0600, Luke Palmer wrote: > On 8/10/05, Autrijus Tang <[EMAIL PROTECTED]> wrote: > > But it's an toplevel optimization, which is not applicable to > > module authors. So I'd very much welcome a lexical pragma that > > forces static binding of subroutine calls. >

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread Luke Palmer
On 8/10/05, Autrijus Tang <[EMAIL PROTECTED]> wrote: > But it's an toplevel optimization, which is not applicable to > module authors. So I'd very much welcome a lexical pragma that > forces static binding of subroutine calls. Yeah, but the whole point of not allowing that is so that you can over

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread Autrijus Tang
On Wed, Aug 10, 2005 at 10:47:47AM +0200, Juerd wrote: > Larry Wall skribis 2005-08-09 16:19 (-0700): > > So either something in the context tells us what "Foo" means, or > > it will be taken as a list operator that hasn't been declared yet. > > Is there, by the way, a pragma to force predeclarati

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-10 Thread Juerd
Larry Wall skribis 2005-08-09 16:19 (-0700): > So either something in the context tells us what "Foo" means, or > it will be taken as a list operator that hasn't been declared yet. Is there, by the way, a pragma to force predeclaration of subs, to gain compile time typo checking? Juerd -- http:

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-09 Thread Stevan Little
Larry, On Aug 9, 2005, at 7:19 PM, Larry Wall wrote: : >So far, this is what I have picked up; some/most of it is probably : >wrong: : > : >~ Foo ~ : >Is a type that variables etc. can be declared to have : : That is one way to look at it I suppose. The reality is that there will : be no actua

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-09 Thread Larry Wall
On Tue, Aug 09, 2005 at 03:54:23PM -0400, Stevan Little wrote: : Stuart, : : On Aug 9, 2005, at 9:25 AM, Stuart Cook wrote: : >Stevan, : > : >Up until today, I thought I had a good idea of how your metamodel : >works, but now I'm confused. My main sticking point is that a class : >Foo seems to ha

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-09 Thread Stevan Little
On Aug 9, 2005, at 10:52 AM, TSa wrote: ~ Foo ~ Is a type that variables etc. can be declared to have Is not an object => I'm really not sure about this... Bare Foo is a namespace lookup. Yes, TSa is right. Everything below this is Type-stuff and I will leave that to him (up until the Met

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-09 Thread Stevan Little
On Aug 9, 2005, at 12:36 PM, TSa wrote: HaloO Stevan, you wrote: Guten Tag Herr Sandlaß, you know that a formal German greeting in a collequial environment can be interpreted as unfriendly? I don't do that but just wanted to state the fact. My apologies, no unfriendliness intended :) The

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-09 Thread Stevan Little
Stuart, On Aug 9, 2005, at 9:25 AM, Stuart Cook wrote: Stevan, Up until today, I thought I had a good idea of how your metamodel works, but now I'm confused. My main sticking point is that a class Foo seems to have three different aspects: Foo class(Foo) meta(Foo) For each of these, could yo

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-09 Thread Autrijus Tang
On Tue, Aug 09, 2005 at 06:36:28PM +0200, TSa wrote: > But Smalltalk is a typeless language that dispatches along the lines > of the (meta)class/(meta)object links. I propose to call this kind > of thing slot dispatch and reserve single and multi method dispatch for > the type based approach. Don't

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-09 Thread TSa
HaloO Stevan, you wrote: Guten Tag Herr Sandlaß, you know that a formal German greeting in a collequial environment can be interpreted as unfriendly? I don't do that but just wanted to state the fact. The next level where a 1:n relation exists is below meta(Foo) to pure meta. Not entirel

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-09 Thread TSa
HaloO, Stuart Cook wrote: So far, this is what I have picked up; some/most of it is probably wrong: At least your confusion matches nicely with mine :) ~ Foo ~ Is a type that variables etc. can be declared to have Is not an object => I'm really not sure about this... Bare Foo is a names

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-09 Thread Stevan Little
Guten Tag Herr Sandlaß, On Aug 9, 2005, at 4:48 AM, TSa (Thomas Sandlaß) wrote: HaloO, Stevan Little wrote: Here is a 10,000 ft view of the metamodel prototype I sketched out the other day (http://svn.openfoundry.org/pugs/perl5/Perl6-MetaModel/docs/ 10_000_ft_view.pod). It should shed a li

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-09 Thread Stuart Cook
Stevan, Up until today, I thought I had a good idea of how your metamodel works, but now I'm confused. My main sticking point is that a class Foo seems to have three different aspects: Foo class(Foo) meta(Foo) For each of these, could you please try to explain: 1) Roughly what its responsibilit

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-09 Thread TSa (Thomas Sandlaß)
HaloO, Stevan Little wrote: Here is a 10,000 ft view of the metamodel prototype I sketched out the other day (http://svn.openfoundry.org/pugs/perl5/Perl6-MetaModel/docs/ 10_000_ft_view.pod). It should shed a little light on this discussion. There you have i(Foo) - instance of Foo

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-08 Thread Stevan Little
, at 4:26 PM, Mark Reed wrote: Coming in late here, but it seems odd to have an actual class called "MetaClass". The meta-object protocols with which I am familiar have the concept of a metaclass (a class whose instances are themselves classes), and the class Class is such a meta

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-08 Thread Stevan Little
Mark, On Aug 8, 2005, at 4:26 PM, Mark Reed wrote: Coming in late here, but it seems odd to have an actual class called "MetaClass". The meta-object protocols with which I am familiar have the concept of a metaclass (a class whose instances are themselves classes), and the clas

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-08 Thread Mark Reed
Coming in late here, but it seems odd to have an actual class called "MetaClass". The meta-object protocols with which I am familiar have the concept of a metaclass (a class whose instances are themselves classes), and the class Class is such a metaclass, but where does a class named

Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-08 Thread Stevan Little
Hello All, Since autrijus is now busy porting the P5 metamodel prototype into Haskell for use in Pugs, I have decided to begin work on documenting the Perl6::MetaModel prototype modules more thoroughly. The first step I see in this is to define a Meta Object Protocol (aka - the stuff you can

Re: Protocols

2003-07-26 Thread Richard J Cox
On Thursday, July 24, 2003, 5:45:33 PM, you (mailto:[EMAIL PROTECTED]) wrote: > On Thursday, July 24, 2003, at 08:49 AM, David Wheeler wrote: > No, I think Java interfaces are a kluge to get around copying a broken > type system and the lack of multiple inheritance. There are other alternatives..

Re: Protocols

2003-07-25 Thread Gordon Henriksen
things that a Window does," e.g., "$anon->implements('Window')". So a class shouldn't inherit from an interface. It should assert that it implements it. Totally on track. I'd like to also rehash what Mr. Goldberg was getting at: One of the very useful

Re: Protocols

2003-07-24 Thread Kurt Starsinic
On Jul 24, chromatic wrote: > On Thursday, July 24, 2003, at 05:28 PM, Benjamin Goldberg wrote: > >If this were Java, the way to do this would be to define a Thingie > >interface, and then an (archetypical) ThingieObject class... any time > >that we want to actually *create* Thingies, we would use

Re: Protocols

2003-07-24 Thread chromatic
On Thursday, July 24, 2003, at 05:28 PM, Benjamin Goldberg wrote: If this were Java, the way to do this would be to define a Thingie interface, and then an (archetypical) ThingieObject class... any time that we want to actually *create* Thingies, we would use "new ThingieObject", but everywhere el

Re: Protocols

2003-07-24 Thread Benjamin Goldberg
Chromatic wrote: [snip] > > I think you want to declare "I comply with ruleset X" at the callee > > object level. That enables the compiler to (1) check that you're not > > lying; and (2) optimize based on (1). > > At least one of us is using "caller/callee" in the X11 sense. What I > mean and wh

Re: Protocols

2003-07-24 Thread Kurt Starsinic
uot;interfaces" to me. Follow the thread back. Objective-C had them way first, and their ur-name is "protocols." - Kurt

Re: Protocols

2003-07-24 Thread Austin Hastings
--- chromatic <[EMAIL PROTECTED]> wrote: > On Thursday, July 24, 2003, at 11:17 AM, Austin Hastings wrote: > > >> No, I think Java interfaces are a kluge to get around copying a > >> broken type system and the lack of multiple inheritance. > > > > Mult

Re: Protocols

2003-07-24 Thread chromatic
On Thursday, July 24, 2003, at 11:17 AM, Austin Hastings wrote: No, I think Java interfaces are a kluge to get around copying a broken type system and the lack of multiple inheritance. Multiple Inheritance != Protocols | Interfaces I quite agree, but I've done enough Java to know that if

Re: Protocols

2003-07-24 Thread Austin Hastings
that interface equivalence were > >> checked before inheritance, as per Luke's idea. > > > > Sounds like you want Java-style "interfaces" to me. > > No, I think Java interfaces are a kluge to get around copying a > broken type system and the lack of multipl

Re: Protocols

2003-07-24 Thread chromatic
On Thursday, July 24, 2003, at 08:49 AM, David Wheeler wrote: On Wednesday, July 23, 2003, at 05:57 PM, chromatic wrote: The first is a deeper question -- besides inheritance, there's delegation, aggregation, and reimplementation (think mock objects) that can make two classes have equivalent i

Re: Protocols

2003-07-24 Thread David Wheeler
On Thursday, July 24, 2003, at 09:25 AM, Kurt Starsinic wrote: Sounds like you want Java-style "interfaces" to me. Follow the thread back. Objective-C had them way first, and their ur-name is "protocols." D'oh! Sorry, I had read that, but then forgot.

Re: Protocols

2003-07-24 Thread David Wheeler
On Wednesday, July 23, 2003, at 05:57 PM, chromatic wrote: The first is a deeper question -- besides inheritance, there's delegation, aggregation, and reimplementation (think mock objects) that can make two classes have equivalent interfaces. I'd like some way to mark this equivalence *withou

Re: Protocols

2003-07-23 Thread chromatic
interface equivalence. Take, for example, an object that combines a FloorWax and a DessertTopping. Delegation's the way to go here, but if I have to inherit from both FloorWax and DessertTopping to signify that the object (somehow) implements both protocols appropriately, there are subtle

Re: Protocols

2003-07-19 Thread Sean O'Rourke
On 19 Jul 2003, Luke Palmer wrote: > [1] It would be totally cool to use a Haskell- or ML-style type > inference system, but those things just don't work in procedural > languages. Could you clarify what you mean by "don't work" here? ML has both assignment and type inference, so it seems like it

Re: Protocols

2003-07-19 Thread Steffen Müller
Luke Palmer wrote: [...] [1] It would be totally cool to use a Haskell- or ML-style type inference system, but those things just don't work in procedural languages. And they're very slow when not done at compile-time. Try a Haskell interpreter like hugs vs. a Haskell compiler like ghc. Steffen --

Protocols

2003-07-19 Thread Luke Palmer
I've been looking around Objective-C a bit, and I would like to turn over an old rock. Remember when I suggested that (static) type equivalence should be based on interface equivalence? Objective-C seems to feel the same way. It calls an interface a I, and specifying it is optional. This maps n