On Tue, 25 Oct 2005, Larry Wall wrote:
But we're trying to design the OO features (indeed, all of Perl 6)
such that you can usefully cargo cult those aspects that are of
immediate interest without being forced to learn the whole thing.
It's not the number one design goal, but it's right up there
On Wed, Oct 26, 2005 at 09:36:48AM +0200, Michele Dondi wrote:
: On Tue, 25 Oct 2005, Larry Wall wrote:
:
: >But we're trying to design the OO features (indeed, all of Perl 6)
: >such that you can usefully cargo cult those aspects that are of
: >immediate interest without being forced to learn the
--- Larry Wall wrote:
> On Tue, Oct 25, 2005 at 05:24:52PM +0200, Michele Dondi wrote:
> : But maybe that's just me. Whatever, I guess that the {casual,average}
> : programmer may be scared by its richness and complexity.
>
> But we're trying to design the OO features (indeed, all of Perl 6)
> su
I should point out that one of the major changes in the most recent
S6 is that named arguments are now marked by : rather than +, with
:foo($bar) being the way to declare parameter $bar but give it the
external name of "foo". A + is now reserved to mark mandatory
parameters, though it's redundant
> And in fact, its very existence defies another implicit principle of
> mine, that is, the "principle of partial definition": Defining a new
> type or instance can only break a previously typechecking program by
> making it ambiguous. The idea behind that is that at some time you
> may realize t
Larry Wall skribis 2005-10-26 6:44 (-0700):
> I should point out that one of the major changes in the most recent
> S6 is that named arguments are now marked by : rather than +, with
> :foo($bar) being the way to declare parameter $bar but give it the
> external name of "foo". A + is now reserved
Larry~
On 10/26/05, Larry Wall <[EMAIL PROTECTED]> wrote:
> So we'd get:
>
> :@array[42] 42 => @array[1]
Do you mean C< :@array[42] 42 => @array[42] >?
> The last three forms are more arguable than the first three, especially
> since they probably aren't valid formal parameters. We kind of
On Tue, Oct 25, 2005 at 10:25:48PM -0600, Luke Palmer wrote:
: Yeah, I didn't really follow his argument on that one. I, too, think
: that the one() junction in general is silly, especially for types.
Well, I think it's silly too. I'm just trying to see if we need to
reserve the syntax in case s
On Wed, Oct 26, 2005 at 10:06:25AM -0400, Matt Fowles wrote:
: Larry~
:
: On 10/26/05, Larry Wall <[EMAIL PROTECTED]> wrote:
: > So we'd get:
: >
: > :@array[42] 42 => @array[1]
:
: Do you mean C< :@array[42] 42 => @array[42] >?
Yes. I was changing it because 42 : 1 :: foo : a, but I flubbe
On Wed, Oct 26, 2005 at 04:02:06PM +0200, Juerd wrote:
: Larry Wall skribis 2005-10-26 6:44 (-0700):
: > I should point out that one of the major changes in the most recent
: > S6 is that named arguments are now marked by : rather than +, with
: > :foo($bar) being the way to declare parameter $bar
It also means you could write a prototype that looks like
:(!, !, !, ?, ?)
We don't need no stinkin' "_". There's more than one way to not care.
(I guess that means that in addition to supporting interesting values
of undef, we also support interesting values of not caring...)
But does that
On 10/26/05, Larry Wall <[EMAIL PROTECTED]> wrote:
> A mandatory named parameter is now marked +:$nonoptionaloption.
Woo! :)
-John
Larry Wall skribis 2005-10-26 7:31 (-0700):
> One slightly serious ramification of the : switch is that the space
> is required after the colon indicating a null invocant.
> method doit (: $a, $b, $c)
Or, we could separate it with a . instead of a :, perhaps?
This is already more or less ver
On Tue, Oct 25, 2005 at 05:17:40PM -0400, Stevan Little wrote:
: Larry,
:
: On Oct 25, 2005, at 4:37 PM, Larry Wall wrote:
: >On Mon, Oct 24, 2005 at 06:33:20AM -0700, Ashley Winters wrote:
: >: # behavior through prototype -- guessing realistic syntax
: >: Base.meta.add_method(
: >: do_it =>
On Wed, Oct 26, 2005 at 04:59:04PM +0200, Juerd wrote:
: Larry Wall skribis 2005-10-26 7:31 (-0700):
: > One slightly serious ramification of the : switch is that the space
: > is required after the colon indicating a null invocant.
: > method doit (: $a, $b, $c)
:
: Or, we could separate it
> That's just self.meta.add_method($label, $method) by my lights.
> A .meta already implies/ignores the .class coercion. If we are to
> support prototype-based programming $x.meta *must not care* whether
> it has been given a class or an instance or something in between.
> What I am calling a "cla
Larry Wall skribis 2005-10-26 8:29 (-0700):
> I think a . would be too lightweight visually within the signature.
> Plus . is a postfix prefix syntactically, not a delimiter.
If weight is the issue, @#@ should do ;)
This aside, you could of course just double the colon. Or use a
semicolon.
I ju
On Wed, Oct 26, 2005 at 11:31:28AM -0400, Rob Kinyon wrote:
: > That's just self.meta.add_method($label, $method) by my lights.
: > A .meta already implies/ignores the .class coercion. If we are to
: > support prototype-based programming $x.meta *must not care* whether
: > it has been given a clas
Larry Wall wrote:
Of course, there are other words that are somewhat synonymous with
"class", Unfortunately "sort" is already hosed. Maybe "kind".
Then evolutionists could make jokes about the K(T) boundary, and
creationists could make jokes about "reproducing after their kind".
Some of us coul
On Oct 26, 2005, at 12:05 PM, Larry Wall wrote:
Of course, there are other words that are somewhat synonymous with
"class", Unfortunately "sort" is already hosed. Maybe "kind".
Actually "kind" is used in the "Core Calculus for Metaclasses" paper
which I brought to the hackathon (not sure if
On Wed, Oct 26, 2005 at 09:05:22AM -0700, Larry Wall wrote:
> Of course, there are other words that are somewhat synonymous with
> "class", Unfortunately "sort" is already hosed. Maybe "kind".
Maybe we could go with something Linnaean like "family" or "genus"
even though their relation to "class"
Larry Wall:
> But perhaps it wouldn't be kind.
'caste' wouldn't either.
For inspiraton: type sort class variety brand category breed manner
style nature form hue caste set background stage setting milieu locale
range assortment selection mixture strain suite scenery rank grade
division status ge
On 10/26/05, Stevan Little <[EMAIL PROTECTED]> wrote:
>
> On Oct 26, 2005, at 12:05 PM, Larry Wall wrote:
> > Of course, there are other words that are somewhat synonymous with
> > "class", Unfortunately "sort" is already hosed. Maybe "kind".
>
> Actually "kind" is used in the "Core Calculus for M
Stevan Little:
> They present an rather interesting view on things, that the
> definition of the instance creating portion of a "class" should be
> seperated from the "class" or "kind" portion of the class.
Its quality. Its character. Its features. Its face.
--
Grtz, Ruud
HaloO,
Larry Wall wrote:
On Wed, Oct 26, 2005 at 04:59:04PM +0200, Juerd wrote:
: Larry Wall skribis 2005-10-26 7:31 (-0700):
: > One slightly serious ramification of the : switch is that the space
: > is required after the colon indicating a null invocant.
What is an invocantless method othe
Larry Wall <[EMAIL PROTECTED]> wrote:
> Of course, there are other words that are somewhat synonymous with
> "class", Unfortunately "sort" is already hosed. Maybe "kind".
> Then evolutionists could make jokes about the K(T) boundary, and
> creationists could make jokes about "reproducing after the
HaloO,
Austin Frank wrote:
Which (sort of) takes us back to TSa's (non)sign-off note from 10/5,
wherein he suggested:
I just can't help it, I love the good work done on this list!
And thanks for spelling the acronym correctly.
The Kindly One of a class beeing the representative like
the Presi
On Wed, Oct 26, 2005 at 12:22:07PM -0400, Stevan Little wrote:
:
: On Oct 26, 2005, at 12:05 PM, Larry Wall wrote:
: >Of course, there are other words that are somewhat synonymous with
: >"class", Unfortunately "sort" is already hosed. Maybe "kind".
:
: Actually "kind" is used in the "Core Calcu
On Wed, Oct 26, 2005 at 07:06:15PM +0200, TSa wrote:
: HaloO,
:
: Larry Wall wrote:
: >On Wed, Oct 26, 2005 at 04:59:04PM +0200, Juerd wrote:
: >: Larry Wall skribis 2005-10-26 7:31 (-0700):
: >: > One slightly serious ramification of the : switch is that the space
: >: > is required after the co
> "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
LW> One wants to coin a word like "Qlass". Unfortunately "qlass" is
LW> too easy to misread as "glass". Oy veh, I'm getting notions of
LW> "the qlass is half empty" for a partially instantiated object.
[EMAIL PROTECTED],
i think you ne
> So maybe we can define our terms like this:
>
> type: a completely generic metaterm for any of the following,
> and then some.
>
> class: a mutable interface object that manages instances in the
> "classical" way, with covariant derivational properties.
>
> role: an immutable
On Wed, Oct 26, 2005 at 03:54:35PM -0400, Rob Kinyon wrote:
: > So maybe we can define our terms like this:
: >
: > type: a completely generic metaterm for any of the following,
: > and then some.
: >
: > class: a mutable interface object that manages instances in the
: > "classical
On 10/26/05, Larry Wall <[EMAIL PROTECTED]> wrote:
> So maybe we can define our terms like this:
>
> type: a completely generic metaterm for any of the following,
> and then some.
>
> class: a mutable interface object that manages instances in the
> "classical" way, with covariant d
> : 3) Aren't classes mutable and roles immutable by default only? Or has
> : this changed?
>
> Of course. To change the default for a role, call it a class, and
> to change the default for a class, call it a role. :-)
Does this mean that roles are the recommended way to create immutable
classes
On Wed, 2005-10-26 at 20:29 -0400, Rob Kinyon wrote:
> I would prefer to use roles as they're closed by default, leaving
> "class" to be my powertool, if I need the power.
I don't understand this desire; can you explain your reasoning?
(NB: "closed" here, as I use it, still *does not* correspond
On 10/26/05, chromatic <[EMAIL PROTECTED]> wrote:
> On Wed, 2005-10-26 at 20:29 -0400, Rob Kinyon wrote:
>
> > I would prefer to use roles as they're closed by default, leaving
> > "class" to be my powertool, if I need the power.
>
> I don't understand this desire; can you explain your reasoning?
On 10/26/05, Rob Kinyon <[EMAIL PROTECTED]> wrote:
> On 10/26/05, chromatic <[EMAIL PROTECTED]> wrote:
> > On Wed, 2005-10-26 at 20:29 -0400, Rob Kinyon wrote:
> >
> > > I would prefer to use roles as they're closed by default, leaving
> > > "class" to be my powertool, if I need the power.
> >
> >
On Wed, Oct 26, 2005 at 08:48:12PM -0400, Rob Kinyon wrote:
: If a role is an immutable class, that means that its internals cannot
: be changed. Hence, the compiler can trust that it will be the same at
: the end as at the beginning. Which means it's optimized. Which means
: my objects run faster
On Wed, Oct 26, 2005 at 04:56:23PM -0600, Luke Palmer wrote:
: > Then ^T $x binds T to the kind of $x. And $x.kind == $y.kind asks
: > if two objects are of the same type,
:
: Don't you mean $x.kind eqv $y.kind?
:
: Ugh.
Now that infix:<::> has come available, maybe I mean:
$x.kind :: $y.k
On Wed, Oct 26, 2005 at 06:34:48PM -0700, Larry Wall wrote:
: On Wed, Oct 26, 2005 at 04:56:23PM -0600, Luke Palmer wrote:
: : > Then ^T $x binds T to the kind of $x. And $x.kind == $y.kind asks
: : > if two objects are of the same type,
: :
: : Don't you mean $x.kind eqv $y.kind?
: :
: : Ugh.
:
On Wed, 2005-10-26 at 19:22 -0600, Luke Palmer wrote:
> But we find that many programmers make decisions that trade
> readability and extensibility for an extra 1% of speed, even when they
> are writing a command-line frontend to MPlayer[1]. If those people
> are module writers, then we have a bu
On 10/26/05, Luke Palmer <[EMAIL PROTECTED]> wrote:
[snip]
> Okay, an open class means you can add methods to it, right? So, let's
> say you have this class:
>
> class Foo {
> method foo() {...}
> method bar() {...}
> }
>
> And this code:
>
> my Foo $x = Foo.new;
>
On Wed, 2005-10-26 at 14:52 -0400, Uri Guttman wrote:
> > "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
> LW> One wants to coin a word like "Qlass". Unfortunately "qlass" is
> LW> too easy to misread as "glass". Oy veh, I'm getting notions of
> LW> "the qlass is half empty" for a par
On Wed, 2005-10-26 at 21:58 -0400, Rob Kinyon wrote:
> Plus, the argument is a straw man. Instead of:
>
> class Some::Class is also {
> }
>
> you would do:
>
> class My::Version {
> does Some::Class;
> }
>
> Problem solved.
Don't forget the fun of modifying all existin
On Wed, Oct 26, 2005 at 07:35:05PM -0700, chromatic wrote:
: On Wed, 2005-10-26 at 21:58 -0400, Rob Kinyon wrote:
:
: > Plus, the argument is a straw man. Instead of:
: >
: > class Some::Class is also {
: > }
: >
: > you would do:
: >
: > class My::Version {
: > does Some::C
On 10/26/05, Rob Kinyon <[EMAIL PROTECTED]> wrote:
> What about:
>
> class Foo is also {
> method foo() { ... }
> }
>
> Where the second foo() is no longer what the first foo() did.
Just overwrite the vtable.
> Furthermore, let's say you have:
>
> class Bar isa Foo {
>
On Thu, 2005-10-20 at 17:12 -0700, Nate Wiger wrote:
> If Perl 6 is going to be successful, this means it must change the
> fewest key things with the most benefits.
I think there's an assumption here that not only do I not hold but I do
not even understand.
Suppose that I am a game developer wi
47 matches
Mail list logo