On Tue, Apr 20, 2004 at 03:53:31PM -0400, Aaron Sherman wrote:
: In specific, here is a proposal for execution:
:
: multi run(string $command) returns(Process) {...} # Funky shell default
: multi run(Process $process) returns(Process) {...} # Relies on $process.cmdline
Eh? What does
On Tue, Apr 20, 2004 at 02:16:01PM -0400, Aaron Sherman wrote:
: Well, I have a lot to digest, but off the top of my head (and having
: nothing to do with objects, but rather the string discussion at the
: end), it would be very useful if I could assert:
:
: no string "complex";
:
: or some
On Tue, Apr 20, 2004 at 10:25:04PM +0200, Juerd wrote:
> Brent 'Dax' Royal-Gordon skribis 2004-04-20 12:58 (-0700):
> > method buffersize()
> > will store {
> > my $sqrt=$^v.sqrt;
> > die "$^v is not a power of two" unless int($sqrt) == $sqrt;
> > $.b
On Tue, 20 Apr 2004, Juerd wrote:
> Brent 'Dax' Royal-Gordon skribis 2004-04-20 12:58 (-0700):
> > method buffersize()
> > will store {
> > my $sqrt=$^v.sqrt;
> > die "$^v is not a power of two" unless int($sqrt) == $sqrt;
> > $.buffer = "\x[0]" x $^
On Tue, 2004-04-20 at 13:55, Larry Wall wrote:
> Okay, let's put this one to rest.
Good, and I'll not try to speak ill of the dead thread, so ignoring hash
and/or array access, let me respond to the end of your message.
> As for C, it probably needs to be completely rethought anyway,
> along wit
On Tue, 20 Apr 2004, Brent 'Dax' Royal-Gordon wrote:
> John Williams wrote:
> > I'm not saying there is anything wrong with that, but John Siracusa is
> > asking for something different, I think. A simple accessor which looks
> > like a method without having to play with Proxy, FETCH, STORE, etc.
Brent 'Dax' Royal-Gordon skribis 2004-04-20 12:58 (-0700):
> method buffersize()
> will store {
> my $sqrt=$^v.sqrt;
> die "$^v is not a power of two" unless int($sqrt) == $sqrt;
> $.buffer = "\x[0]" x $^v;
> }
> { +$.buffer.bytes }
Could
On 4/20/04 4:08 PM, Aaron Sherman wrote:
> On Tue, 2004-04-20 at 15:40, John Siracusa wrote:
>> On 4/20/04 2:37 PM, Larry Wall wrote:
>>> It's wrong to introduce a fundamental asymmetry that breaks the contract
>>> that an accessor can be used as a variable.
>>
>> Er, I think we have different def
John Williams wrote:
class Dog {
has $.foo
will FETCH { ... }
will STORE { ... }
;
}
I'm not saying there is anything wrong with that, but John Siracusa is
asking for something different, I think. A simple accessor which looks
like a method without h
On Tue, 2004-04-20 at 15:40, John Siracusa wrote:
> On 4/20/04 2:37 PM, Larry Wall wrote:
> > It's wrong to introduce a fundamental asymmetry that breaks the contract that
> > an accessor can be used as a variable.
>
> Er, I think we have different definitions of "accessor." I'm perfectly
> happy
On 2004-04-20 at 11:37:18, Larry Wall wrote:
> So do whatever you like to the declarations, but make sure you preserve
> the symmetry and extensibility of
>
> $obj.foo([EMAIL PROTECTED], *%NONSENSE) # get value of $.foo
> $obj.foo([EMAIL PROTECTED], *%NONSENSE) = 5 # set $
On 4/20/04 2:37 PM, Larry Wall wrote:
> On Tue, Apr 20, 2004 at 01:15:24PM -0400, John Siracusa wrote:
> : With that "has" line alone, you auto-magically get an accessor that works
> : like this:
> :
> : $obj.foo# get value of $.foo
> : $obj.foo(5) # set $.foo = 5
>
> I don't care wha
On Tue, Apr 20, 2004 at 01:15:24PM -0400, John Siracusa wrote:
: With that "has" line alone, you auto-magically get an accessor that works
: like this:
:
: $obj.foo# get value of $.foo
: $obj.foo(5) # set $.foo = 5
I don't care what syntactic sugar you put underneath, but if you expos
Well, I have a lot to digest, but off the top of my head (and having
nothing to do with objects, but rather the string discussion at the
end), it would be very useful if I could assert:
no string "complex";
or something like that. That is to say, I would love to have a way to
say that my
On Tue, 20 Apr 2004, Luke Palmer wrote:
> John Williams writes:
> > On Tue, 20 Apr 2004, Luke Palmer wrote:
> > > There. Now here's the important part: in order to *use* all this, you
> > > import whatever module defines it, and then say:
> > >
> > > class Dog {
> > > method foo (?$ar
Okay, let's put this one to rest. I've suspended judgement long enough.
Let me first say that I have my own personal biases, and they are
towards keeping things visually and psychologically distinctive,
rather than towards reducing keystrokes. (Though I have enough
arthritis in my hands to at le
On 4/20/04 12:14 PM, Luke Palmer wrote:
> Okay, well, I thought that my example did that, but apparently using
> C and C is a little too complex... (my sentiments
> are beginning to follow Larry's, in that I'm not sure you know what you
> want -- perhaps you could give a hypotheical syntax?)
There
On 2004-04-20 at 10:51:47, Luke Palmer wrote:
> I guess I bogged down that message with the implementation, so the
> result may have been easy to miss.
That is what happened in my case. Apologies; it looks like your
original solution would do the job nicely. As long as the requisite
module come
John Williams writes:
> On Tue, 20 Apr 2004, Luke Palmer wrote:
> > There. Now here's the important part: in order to *use* all this, you
> > import whatever module defines it, and then say:
> >
> > class Dog {
> > method foo (?$arg) is accessor {
> > # accessor code here
>
On Tue, 20 Apr 2004, Luke Palmer wrote:
> There. Now here's the important part: in order to *use* all this, you
> import whatever module defines it, and then say:
>
> class Dog {
> method foo (?$arg) is accessor {
> # accessor code here
> }
> }
>
> If that's not
Juerd writes:
> Peter Haworth skribis 2004-04-20 14:56 (+0100):
> > > I think %hash<> is best explained as %hash{ << key key
> > > key >> } with implicit curlies, not as an alternative to curlies.
> > In that case, why aren't you suggesting something more in line with that?
> > Here's what I'd lik
Austin Hastings writes:
> One of the things that got a little less clear with A12 was the idea of
> multiple C clauses.
>
> Once upon a time, we talked about:
>
> my $spot is Dog is const is persistent is ...;
>
> Obviously some of those are traits, now. However, I'm wondering how to
> handle
Mark J. Reed writes:
> Let me just chime in with my support for John's basic idea. I would
> definitely prefer that it be easy to arrange things such that
>
> $obj.foo = 'bar'
>
> winds up invoking a method on $obj with 'bar' as an argument, rather
> than invoking a method on $obj that ret
One of the things that got a little less clear with A12 was the idea of
multiple C clauses.
Once upon a time, we talked about:
my $spot is Dog is const is persistent is ...;
Obviously some of those are traits, now. However, I'm wondering how to
handle things like my recent suggestion of a clas
> -Original Message-
> From: Mark J. Reed [mailto:[EMAIL PROTECTED]
>
> Let me just chime in with my support for John's basic idea. I would
> definitely prefer that it be easy to arrange things such that
>
> $obj.foo = 'bar'
>
> winds up invoking a method on $obj with 'bar' as an a
Mark J. Reed wrote:
Let me just chime in with my support for John's basic idea. I would
definitely prefer that it be easy to arrange things such that
$obj.foo = 'bar'
winds up invoking a method on $obj with 'bar' as an argument, rather
than invoking a method on $obj that returns an lvalue to wh
Peter Haworth skribis 2004-04-20 14:56 (+0100):
> > I think %hash<> is best explained as %hash{ << key key
> > key >> } with implicit curlies, not as an alternative to curlies.
> In that case, why aren't you suggesting something more in line with that?
> Here's what I'd like to see instead of your
At 10:51 AM -0400 4/20/04, John Siracusa wrote:
On 4/20/04 10:42 AM, Dan Sugalski wrote:
At 9:50 AM -0400 4/20/04, John Siracusa wrote:
On 4/19/04 7:16 PM, Larry Wall wrote:
Well, no, we're still stuck at run-time validation of that. In the case
of methods you can't really do anything else an
On 4/20/04 10:42 AM, Dan Sugalski wrote:
> At 9:50 AM -0400 4/20/04, John Siracusa wrote:
>> On 4/19/04 7:16 PM, Larry Wall wrote:
>>> Well, no, we're still stuck at run-time validation of that. In the case
>>> of methods you can't really do anything else anyway, generally speaking.
>>
>> Why is
At 9:50 AM -0400 4/20/04, John Siracusa wrote:
On 4/19/04 7:16 PM, Larry Wall wrote:
> Well, no, we're still stuck at run-time validation of that. In the case
of methods you can't really do anything else anyway, generally speaking.
Why is that?
Because at compile time all you have is a generic t
Let me just chime in with my support for John's basic idea. I would
definitely prefer that it be easy to arrange things such that
$obj.foo = 'bar'
winds up invoking a method on $obj with 'bar' as an argument, rather
than invoking a method on $obj that returns an lvalue to which
'bar' is
On Fri, 16 Apr 2004 23:45:48 +0200, Juerd wrote:
> Jonathan Scott Duff skribis 2004-04-16 15:51 (-0500):
> > Except that you've put things in this explanation that shouldn't be
> > there IMHO. The %varname<> is a special case, but not of "getting a
> > single item from a hash", rather it's a specia
On 4/20/04 1:25 AM, Luke Palmer wrote:
> John Siracusa writes:
>> The "will STORE" stuff covers the easy cases, but can I extend it all the
>> way up to a name() that's a multimethod with a ton of optional args? I
>> supposed you can (technically) do all of that with "will STORE", but it
>> seems
On 4/19/04 10:04 PM, Damian Conway wrote:
> John Siracusa wrote:
>> I'd either like a way to more cleanly extend the default accessor's
>> assignment behavior down the road (i.e. by just writing a new name() method,
>> not by hacking away at STORE traits and adding private worker subs) or a way
>>
On 4/19/04 9:05 PM, Damian Conway wrote:
> You want:
>
> sub foo(+$a is required, +$b is required) { ... }
Yes, that would be just fine :)
-John
On 4/19/04 7:20 PM, Larry Wall wrote:
> On Mon, Apr 19, 2004 at 06:53:29PM -0400, John Siracusa wrote:
> : Yeah, that's exactly what I don't want to type over and over :)
>
> I really don't understand what you're getting at here. First you
> complain that you'd rather write an ordinary method, an
On 4/19/04 7:16 PM, Larry Wall wrote:
> On Mon, Apr 19, 2004 at 01:44:53PM -0400, John Siracusa wrote:
> : ...named and required, or named and optional? IOW, is this all true?
> :
> : sub foo(+$a, +$b) { ... }
> :
> : foo(); # compile-time error!
> : foo(1, 2); # compil
> On 4/19/04 3:58 PM, Austin Hastings wrote:
> One work-around might be an alternate kind of default accessor that doesn't
> allow assignment:
>
> $dog.name # get
> $dog.name('foo') # set
> $dog.name = 'foo' # compile-time error
I think we already have this. Just define a
On Mon, Apr 19, 2004 at 08:21:58PM -0400, Joe Gottman wrote:
:Apocalypse 12 was very clear about the difference between private and
: public class members, but it didn't say anything about protected ones? How
: can you define a protected member?
You can't. The concept of "protected" does not
Since this horse came back to life, I'm going to give it a good thrashing, and
I've got goons to help me.
I've asked the Phoenix Perl Mongers for their take on the situation. I've posted
a _completely_ unbiased synopsis of the situation. Here are excerpts from the replies:
Tony's take:
"Rename
40 matches
Mail list logo