Re: Multiple-dispatch on functions

2001-09-01 Thread Ken Fox
[EMAIL PROTECTED] wrote: > Dan, I don't immediately see how per object/class dispatch > control helps to make multimethods pluggable. The way to approach this problem is to profile Class::MultiMethods and figure out (a) where the hot spots are and (b) what core support would help eliminate those

Re: Multiple-dispatch on functions

2001-09-01 Thread Dan Sugalski
At 04:35 PM 8/31/2001 -0500, Me wrote: >Dan, I don't immediately see how per object/class dispatch >control helps to make multimethods pluggable. There's going to be a "method call" entry in the variable's vtable. You want a different method call method, you change the entry. Probably by changi

RE: Expunge implicit @_ passing

2001-09-01 Thread Dan Sugalski
At 05:23 PM 8/28/2001 -0700, David Whipp wrote: > > They list two reasons to make your class final. One is security > > (which might actually be valid, but I doubt it will hold up to > > determined attack), the other though... > > > > You may also wish to declare a class as final for object-o

RE: CLOS multiple dispatch

2001-09-01 Thread Dan Sugalski
At 06:34 PM 8/30/2001 -0700, Hong Zhang wrote: >With optimized C compiler, we can achieve similar performace >with obviously more code. Let's say C is only 80% of Fortran on math, I >still don't see the reason to put math into C language for the last 20% of >speed. It may be my personal preferen

Re: Multiple-dispatch on functions

2001-09-01 Thread Dan Sugalski
At 10:03 PM 8/30/2001 -0400, Michael G Schwern wrote: >Thinking about what Zhang was saying about multiple-dispatch not being >inherently OO. I think he's sort of right. Multiple-dispatch need >not be confined to method lookups. There is the potential for a pretty significant cost to this, sinc

!< and !>

2001-09-01 Thread raptor
hi, I was looking at Interbase SELECT syntax and saw these two handy shortcuts : = {= | < | > | <= | >= | !< | !> | <> | !=} !< and !> Personaly i didn't liked if (! ...) construct too much, so even that starting to use "unless" is harder for non-english speaker, I think is much cleaner and

Re: CLOS multiple dispatch

2001-09-01 Thread Dan Sugalski
At 04:09 PM 8/31/2001 -0500, Me wrote: > > If the dispatcher is drop-in replacable, what does its > > interface look like? > >I'm thinking this is either deep in mop territory, or a probably quite >straightforward set of decisions about dispatch tables, depending >on how you look at things. It'll

Re: Will subroutine signatures apply to methods in Perl6

2001-09-01 Thread Ken Fox
Uri Guttman wrote: [Re: use strict 'typing'; my $rex = new Dog; $rex.bark] > then it should be a compile time error at the assignment to $rex > and not later. you can't trace $rex at compile time to see what > kind of object (if any) was assigned to it. so the illegal method > call can't (easily)

Re: Multiple-dispatch on functions

2001-09-01 Thread Michael G Schwern
On Sat, Sep 01, 2001 at 01:10:58PM -0400, Dan Sugalski wrote: > At 10:03 PM 8/30/2001 -0400, Michael G Schwern wrote: > >Thinking about what Zhang was saying about multiple-dispatch not being > >inherently OO. I think he's sort of right. Multiple-dispatch need > >not be confined to method lookup

Re: Multiple-dispatch on functions

2001-09-01 Thread Dan Sugalski
At 03:06 PM 9/1/2001 -0400, Michael G Schwern wrote: >On Sat, Sep 01, 2001 at 01:10:58PM -0400, Dan Sugalski wrote: > > At 10:03 PM 8/30/2001 -0400, Michael G Schwern wrote: > > >Thinking about what Zhang was saying about multiple-dispatch not being > > >inherently OO. I think he's sort of right.

Re: Multiple-dispatch on functions

2001-09-01 Thread Michael G Schwern
On Sat, Sep 01, 2001 at 03:12:17PM -0400, Dan Sugalski wrote: > Nope, the cost will be paid on all sub calls. We at least need to check on > every sub call to see if there are multiple versions of the functions. (We > can't tell at compile time if it's a single or multi-method sub call, since >

Re: !< and !>

2001-09-01 Thread Russ Allbery
raptor <[EMAIL PROTECTED]> writes: > I was looking at Interbase SELECT syntax and saw these two handy > shortcuts : > = {= | < | > | <= | >= | !< | !> | <> | !=} > !< and !> How is !< different from >=? -- Russ Allbery ([EMAIL PROTECTED])

Re: Multiple-dispatch on functions

2001-09-01 Thread Dan Sugalski
At 03:43 PM 9/1/2001 -0400, Michael G Schwern wrote: >On Sat, Sep 01, 2001 at 03:12:17PM -0400, Dan Sugalski wrote: > > Nope, the cost will be paid on all sub calls. We at least need to check on > > every sub call to see if there are multiple versions of the functions. (We > > can't tell at compil

RE: !< and !>

2001-09-01 Thread Sterin, Ilya
Though it might prove convenient (just more syntax for more than one way to do it) it's equivalent to !< == >= and !> == <= , it might be too confusing, though I myself would think that since != and ne is implemented, !< and !> would definitely make common sense to implement as well. Ilya >

RE: !< and !>

2001-09-01 Thread Sterin, Ilya
> -Original Message- > From: Russ Allbery [mailto:[EMAIL PROTECTED]] > Sent: Saturday, September 01, 2001 4:03 PM > To: [EMAIL PROTECTED] > Subject: Re: !< and !> > > > raptor <[EMAIL PROTECTED]> writes: > > > I was looking at Interbase SELECT syntax and saw these two handy > > shortc

Re: !< and !>

2001-09-01 Thread Russ Allbery
Sterin, Ilya <[EMAIL PROTECTED]> writes: >> From: Russ Allbery [mailto:[EMAIL PROTECTED]] >> How is !< different from >=? > It's just more syntax just like foo != bar > is the same as (foo > bar || foo < bar). > It might prove convenient to express the expression. It's the same number of char

Re: !< and !>

2001-09-01 Thread Bryan C . Warnock
On Saturday 01 September 2001 05:40 pm, Russ Allbery wrote: > Sterin, Ilya <[EMAIL PROTECTED]> writes: > >> From: Russ Allbery [mailto:[EMAIL PROTECTED]] > >> > >> How is !< different from >=? > > > > It's just more syntax just like foo != bar > > is the same as (foo > bar || foo < bar). > > > > I

Re: !< and !>

2001-09-01 Thread Andrew Wilson
On Sat, Sep 01, 2001 at 02:40:40PM -0700, Russ Allbery wrote: > >> How is !< different from >=? > > > It's just more syntax just like foo != bar > > is the same as (foo > bar || foo < bar). Not if you're using Quantum::SuperPositions ;-) > > It might prove convenient to express the expression.

Re: Multiple-dispatch on functions

2001-09-01 Thread Damian Conway
Ken wrote: > The way to approach this problem is to profile > Class::MultiMethods and figure out (a) where the hot spots > are and (b) what core support would help eliminate those > hot spots. But please don't do that until I release the next update of C::MM, which will use a new dis

LangSpec: Statements and Blocks

2001-09-01 Thread Bryan C . Warnock
A couple weeks ago I alluded that I was working on some documentation. After a brief hiatus, I've picked it back up, and am ready to release an entire half document. Big whoopee. Anyway, what I'm working on is more or less a Statement of Fact, from a Perl 6 language perspective. It is in

RE: Multiple-dispatch on functions

2001-09-01 Thread Brent Dax
# -Original Message- # From: Ken Fox [mailto:[EMAIL PROTECTED]] # Sent: Saturday, September 01, 2001 9:44 AM # To: Me # Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Michael G Schwern; Dan # Sugalski # Subject: Re: Multiple-dispatch on functions ... # The one thing I'm curious about is whether

Re: LangSpec: Statements and Blocks

2001-09-01 Thread Uri Guttman
> "BCW" == Bryan C Warnock <[EMAIL PROTECTED]> writes: BCW> Keywords BCW> continue, do, else, elsif, for, foreach, given, goto, grep, if, last, BCW> map, next, redo, sort, sub, unless, until, when, while BCW> Basic Constructs BCW> 1. [ LABEL: ] expr; BCW> 2. [ LABEL:

RE: !< and !>

2001-09-01 Thread Sterin, Ilya
> -Original Message- > From: Andrew Wilson [mailto:[EMAIL PROTECTED]] > Sent: Saturday, September 01, 2001 6:06 PM > To: Russ Allbery > Cc: [EMAIL PROTECTED] > Subject: Re: !< and !> > > > On Sat, Sep 01, 2001 at 02:40:40PM -0700, Russ Allbery wrote: > > >> How is !< different from >=? >

RE: !< and !>

2001-09-01 Thread Sterin, Ilya
> -Original Message- > From: Bryan C. Warnock [mailto:[EMAIL PROTECTED]] > Sent: Saturday, September 01, 2001 5:59 PM > To: Russ Allbery; [EMAIL PROTECTED] > Subject: Re: !< and !> > > > On Saturday 01 September 2001 05:40 pm, Russ Allbery wrote: > > Sterin, Ilya <[EMAIL PROTECTED]> writ

Re: Multiple-dispatch on functions

2001-09-01 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 03:06 PM 9/1/2001 -0400, Michael G Schwern wrote: > >On Sat, Sep 01, 2001 at 01:10:58PM -0400, Dan Sugalski wrote: > > > At 10:03 PM 8/30/2001 -0400, Michael G Schwern wrote: > > > >Thinking about what Zhang was saying about multiple-dispatch not bein