On 2/12/06, Thomas Sandlass <[EMAIL PROTECTED]> wrote:
> > > IIRC, you can always create a new method for a class, even outside of
> > > its definition, simply by ensuring that the first parameter to be
> > > passed in will be an object of that type:
> > >
> > > method bark (Dog $_) { ... }
> >
>
Thomas Sandlass wrote:
> > > or maybe
> > >
> > > method Dog.bark () { ... }
> >
> > Yes that works too.
>
> Shouldn't that read Dog::bark? Why the dot?
Because I'm not 100% with the proper syntax of things. The intent was
to add a bark() method to Dog during runtime.
--
Jonathan "Dataweaver"
Stevan Little wrote:
> ^Dog is an instance of the MetaClass, while Dog (no ^ sigil) is the
> "class" (actually it's a prototypical instance of the class which the
> metaclass ^Dog describes, but you dont really need to know that to use
> it).
>
> ^Dog.can(bark) # false
> Dog.can(bark) # true
Stevan Little wrote:
> Jonathan Lang wrote:
> > OK; apparently, what I meant when I asked "what methods and attributes
> > does ^Dog have?" is what you're talking about when you speak of which
> > methods ^Dog will respond to. To me, an object has whatever methods
> > that it responds to.
>
> I di
On 2/9/06, Jonathan Lang <[EMAIL PROTECTED]> wrote:
> Stevan Little wrote:
> > Jonathan Lang wrote:
> > > OK. To help me get a better idea about what's going on here, what
> > > sorts of attributes and methods would ^Dog have?
> >
> > Well, a metaclass describes the behaviors and attributes of a c
Stevan Little wrote:
> Jonathan Lang wrote:
> > OK. To help me get a better idea about what's going on here, what
> > sorts of attributes and methods would ^Dog have?
>
> Well, a metaclass describes the behaviors and attributes of a class,
> and ^Dog is an *instance* of the metaclass. So actually
On 2/8/06, Jonathan Lang <[EMAIL PROTECTED]> wrote:
> Stevan Little wrote:
> > Yes, that is correct, because:
> >
> > Dog.isa(Dog) # true
> > $spot.isa(Dog) # true
> > ^Dog.isa(Dog) # false
> >
> > In fact ^Dog isa MetaClass (or Class whatever you want to call it).
> >
> > At least that is how I
Stevan Little wrote:
> Yes, that is correct, because:
>
> Dog.isa(Dog) # true
> $spot.isa(Dog) # true
> ^Dog.isa(Dog) # false
>
> In fact ^Dog isa MetaClass (or Class whatever you want to call it).
>
> At least that is how I see/understand it.
OK. To help me get a better idea about what's goin
On 2/8/06, Jonathan Lang <[EMAIL PROTECTED]> wrote:
> Consider "my Dog $spot". From the Perl6-to-English Dictionary:
> Dog: a dog.
> $spot: the dog that is named Spot.
> ^Dog: the concept of a dog.
>
> Am I understanding things correctly?
>
> If so, here's what I'd expect: a dog can bark, or
Consider "my Dog $spot". From the Perl6-to-English Dictionary:
Dog: a dog.
$spot: the dog that is named Spot.
^Dog: the concept of a dog.
Am I understanding things correctly?
If so, here's what I'd expect: a dog can bark, or Spot can bark; but
the concept of a dog cannot bark:
can Dog "b
On Tue, Feb 07, 2006 at 07:32:18PM -0500, Stevan Little wrote:
: On 2/7/06, Matt Fowles <[EMAIL PROTECTED]> wrote:
: > Stevan~
: >
: > I am going to assume that you intended to reply to perl 6 language,
: > and thus will include your post in its entirety in my response.
:
: Yes, sorry... I missed
Stevan~
On 2/7/06, Stevan Little <[EMAIL PROTECTED]> wrote:
>
> > After all Foo is just a specific instance of the class Class.
>
> Shhh... class objects don't exist ... I was never here,... I will I
> count to three and when I snap my fingers you will awaken and will
> have forgotten all about cl
On 2/7/06, Matt Fowles <[EMAIL PROTECTED]> wrote:
> Stevan~
>
> On 2/7/06, Stevan Little <[EMAIL PROTECTED]> wrote:
> >
> > Well, to be totally honest, I think only Larry truely understands
> > their usage, but to the best of my understanding they are intented to
> > serve a number of roles;
>
> I
Stevan~
On 2/7/06, Stevan Little <[EMAIL PROTECTED]> wrote:
>
> Well, to be totally honest, I think only Larry truely understands
> their usage, but to the best of my understanding they are intented to
> serve a number of roles;
I agree with you about that, which is part of what bothers me.
>
>
On 2/7/06, Matt Fowles <[EMAIL PROTECTED]> wrote:
> Stevan~
>
> I am going to assume that you intended to reply to perl 6 language,
> and thus will include your post in its entirety in my response.
Yes, sorry... I missed the "reply to all" button on the gmail UI by a
few pixels I guess. Thank you
Stevan~
I am going to assume that you intended to reply to perl 6 language,
and thus will include your post in its entirety in my response.
On 2/7/06, Stevan Little <[EMAIL PROTECTED]> wrote:
> On 2/7/06, Matt Fowles <[EMAIL PROTECTED]> wrote:
> > Larry~
> >
> > On 2/7/06, Larry Wall <[EMAIL PROT
Larry~
On 2/7/06, Larry Wall <[EMAIL PROTECTED]> wrote:
>
> Indeed, and the modeling point of view is that $pipe is *also* just
> a representation of the Pipe. Neither Pipe nor $pipe is the thing
> itself. Most computer programs are about Something Else, so computer
> languages should be optimiz
On Mon, Feb 06, 2006 at 10:41:02PM -0500, Matt Fowles wrote:
: Larry~
:
: On 2/6/06, Larry Wall <[EMAIL PROTECTED]> wrote:
: > This is mostly motivated by linguistics rather than computer science,
: > insofar as types/classes/roles in natural language are normally
: > represented by generic object
On 2/6/06, Larry Wall <[EMAIL PROTECTED]> wrote:
> So the basic answer to you question is, I think, yes. If Dog chooses
> to always return true for .defined, then (in Haskell terms) it's more
> like a Just type than a Maybe type. Perl 6's objects like to be Maybe
> types by default, but you can o
Larry~
On 2/6/06, Larry Wall <[EMAIL PROTECTED]> wrote:
> This is mostly motivated by linguistics rather than computer science,
> insofar as types/classes/roles in natural language are normally
> represented by generic objects rather than "meta" objects. When I
> ask in English:
>
> Can a dog
On 2/6/06, Larry Wall <[EMAIL PROTECTED]> wrote:
> This is mostly motivated by linguistics rather than computer science,
> insofar as types/classes/roles in natural language are normally
> represented by generic objects rather than "meta" objects. When I
> ask in English:
>
> Can a dog bark?
>
At 3:02 PM +0800 2/6/06, Audrey Tang wrote:
On 2/6/06, Darren Duncan <[EMAIL PROTECTED]> wrote:
Speaking briefly, I would like it if Perl 6 provided a way for a
class (or role, or meta-class, etc) to declare that all variables
declared to be of that type are automatically/implicitly set to a
On Sun, Feb 05, 2006 at 07:26:09PM -0800, Darren Duncan wrote:
: Part way through writing this, I had a brief chat on #perl6 with
: stevan (and apparently the meta-model is still quite in flux) and he
: said my question was related to Larry's "class but undef" idea, and
: that Larry should talk
On 2/6/06, Darren Duncan <[EMAIL PROTECTED]> wrote:
> Speaking briefly, I would like it if Perl 6 provided a way for a
> class (or role, or meta-class, etc) to declare that all variables
> declared to be of that type are automatically/implicitly set to a
> particular value at declaration time, so t
All,
Speaking briefly, I would like it if Perl 6 provided a way for a
class (or role, or meta-class, etc) to declare that all variables
declared to be of that type are automatically/implicitly set to a
particular value at declaration time, so that they are not undefined
if the programmer usin
25 matches
Mail list logo