[perl #131381] [BUG]function prototypes using array of subset type give type error

2017-05-27 Thread via RT
# New Ticket Created by Dan Miller # Please include the string: [perl #131381] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=131381 > This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda implementing

[perl6/specs] 653f80: Adjust some prototypes to post-GLR implementation ...

2015-09-08 Thread GitHub
-library/Containers.pod Log Message: --- Adjust some prototypes to post-GLR implementation state. Also, write better natural-language descriptions of some methods, since the pseudocode had gone stale anyway. Remove map(*) as it was removed during GLR. Grammar and whitespace

Re: [perl #56534] [PATCH] lexinfo and addregistry pmc lacks prototypes

2008-07-02 Thread chromatic
On Wednesday 02 July 2008 10:08:56 NotFound wrote: > The lexinfo and addregistry pmc uses hash an pmc hash functions > without access to his prototypes, giving warnings in c build and error > in c++ build. > > This patch fixes the problem. r28900 removed them, so I added a nice c

[perl #56534] [PATCH] lexinfo and addregistry pmc lacks prototypes

2008-07-02 Thread via RT
his prototypes, giving warnings in c build and error in c++ build. This patch fixes the problem. -- Salu2 Index: src/pmc/addrregistry.pmc === --- src/pmc/addrregistry.pmc (revisión: 28958) +++ src/pmc/addrregistry.pmc (copia de trab

[perl #43249] [TODO] remove SMOP prototypes

2007-06-19 Thread via RT
# New Ticket Created by Allison Randal # Please include the string: [perl #43249] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=43249 > To be removed from the 0.4.14 release (deprecation notice given in 0.4.13). src/pmc

Re: [perl #43089] [PATCH] Move src/ops/*.c function prototypes to the generated header files

2007-05-31 Thread chromatic
On Thursday 31 May 2007 07:19:11 Steve Peters wrote: > Function prototypes in C work much better when they are living in a header > file rather than in .c files. The attached patch below moves the > prototypes generated in the src/ops/*.c files to the header files created > from the

[perl #43089] [PATCH] Move src/ops/*.c function prototypes to the generated header files

2007-05-31 Thread via RT
# New Ticket Created by Steve Peters # Please include the string: [perl #43089] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=43089 > Function prototypes in C work much better when they are living in a header file rat

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-10-05 Thread TSa
HaloO, Larry Wall wrote: Basically, all types do Package whenever they need an associated namespace. Great! This is how I imagined things to be. And the reason why the :: sigil is also the separator of namespaces. And most of the Package role is simply: method postfix:<::> () { return

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Mark J. Reed
On 9/29/06, Jonathan Lang <[EMAIL PROTECTED]> wrote: And here I thought you were a responsible, law-abiding citizen... :P And so it begins. I daresay there will be no shortage of jokes among P6ers about "does Hash" ... -- Mark J. Reed <[EMAIL PROTECTED]>

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Jonathan Lang
Larry Wall wrote: but only if self.HOW does Hash. And here I thought you were a responsible, law-abiding citizen... :P -- Jonathan "Dataweaver" Lang

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Larry Wall
On Fri, Sep 29, 2006 at 01:24:12PM -0700, Larry Wall wrote: : method postfix:<::> () { return %.HOW.packagehash } Urque. Actually, that'd have to be %($.HOW.packagehash) or $.HOW.packagehash.{}, since what I wrote there would mean %(self.HOW).packagehash instead, which might work accidentally

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Larry Wall
On Fri, Sep 29, 2006 at 02:05:06PM -0400, Mark J. Reed wrote: : On 9/29/06, Jonathan Lang <[EMAIL PROTECTED]> wrote: : >Terminology issue: IIRC (and please correct me if I'm wrong), Perl 6 : >uses 'module' to refer to 'a perl 5-or-earlier module', and uses : >'package' to refer to the perl 6-or-lat

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Jonathan Lang
Mark J. Reed wrote: Jonathan Lang wrote: > Terminology issue: IIRC (and please correct me if I'm wrong), Perl 6 > uses 'module' to refer to 'a perl 5-or-earlier module', and uses > 'package' to refer to the perl 6-or-later equivalent. Other way around. "package" is Perl 5, because that's the P5

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Mark J. Reed
On 9/29/06, Jonathan Lang <[EMAIL PROTECTED]> wrote: Terminology issue: IIRC (and please correct me if I'm wrong), Perl 6 uses 'module' to refer to 'a perl 5-or-earlier module', and uses 'package' to refer to the perl 6-or-later equivalent. Other way around. "package" is Perl 5, because that'

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Larry Wall
On Fri, Sep 29, 2006 at 12:35:43AM -0700, Trey Harris wrote: : If you define a BUILD in a role, will it be called when an object of a : class that does the role is instantiated, as part of the .new BUILD walk? Yes. That is mentioned in A12, even if S12 didn't make it explicit. At least S12:531 i

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Miroslav Silovic
t is about requiring minimal functionality from the parties in the contract, not about banning them from going above the requirements. Secondly, what happens when you use two modules with two different prototypes for the same multi? Without this declaration, and assuming the modules don'

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Jonathan Lang
Terminology issue: IIRC (and please correct me if I'm wrong), Perl 6 uses 'module' to refer to 'a perl 5-or-earlier module', and uses 'package' to refer to the perl 6-or-later equivalent. Aaron Sherman wrote: Details: Larry has said that programming by contract is one of the many paradigms that

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Trey Harris
In a message dated Fri, 29 Sep 2006, Aaron Sherman writes: First the high-level point: I'm dropping the RFC, because, as TimToady pointed out on IRC, we're not quite far enough down the line to see the breadth or certainty of the need yet. Yes, but I don't think the conversation should stop.

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Trey Harris
In a message dated Thu, 28 Sep 2006, Jonathan Lang writes: while roles can be abstract, classes and packages should not be. Really? I think I need to let that sink in and percolate a bit. I'm rather fond of creating abstract superclasses to factor out common object-management code. I have m

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Aaron Sherman
Jonathan Lang wrote: I hope not. My understanding is that '{ ... }' is supposed to represent the notion of abstract routines: if you compose a role that has such routines into a class or package, I'd expect the package to complain bitterly if any such routines are left with yada-yadas as their c

RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-28 Thread Jonathan Lang
Trey Harris wrote: One thing that occurs to me: following this "contract" or "promise" analogy, what does C<...> mean in a role or class? Unless I've missed somewhere in the Synopses that explicates C<...> differently in this context, yada-yada-yada is just code that "complains bitterly (by call

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-28 Thread Trey Harris
In a message dated Thu, 28 Sep 2006, Aaron Sherman writes: Jonathan Lang wrote: Aaron Sherman wrote: Jonathan Lang wrote: > Actually, it's a promise made by a package (not a class) to meet the > specification given by a role (which can, and in this case probably > does, reside in a separate fil

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-28 Thread Aaron Sherman
Jonathan Lang wrote: Aaron Sherman wrote: Jonathan Lang wrote: > Actually, it's a promise made by a package (not a class) to meet the > specification given by a role (which can, and in this case probably > does, reside in a separate file - quite likely one heavily laced with > POD). That's a fi

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-28 Thread Jonathan Lang
Aaron Sherman wrote: Jonathan Lang wrote: > Actually, it's a promise made by a package (not a class) to meet the > specification given by a role (which can, and in this case probably > does, reside in a separate file - quite likely one heavily laced with > POD). That's a fine thing to want to do

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-28 Thread Aaron Sherman
Jonathan Lang wrote: Aaron Sherman wrote: TSa wrote: > Miroslav Silovic wrote: >> package Foo does FooMultiPrototypes { >> ... >> } > > I like this idea because it makes roles the central bearer of type > information. Type information is secondary to the proposal, but I'll run with what you sai

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-28 Thread Jonathan Lang
Aaron Sherman wrote: TSa wrote: > Miroslav Silovic wrote: >> package Foo does FooMultiPrototypes { >> ... >> } > > I like this idea because it makes roles the central bearer of type > information. Type information is secondary to the proposal, but I'll run with what you said. This (the example,

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-28 Thread Aaron Sherman
a constraint. It's more of a second definition, and there isn't much need for that in Perl 6. I'm starting to think that "proto" was the wrong word, as it immediately makes people think about C/C++ "prototypes", which are not at all the same beast. O

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-28 Thread TSa
HaloO, Trey Harris wrote: I would hate for Perl 6 to start using C or C in the sort of ways that many languages abuse "Object" to get around the restrictions of their type systems. I think that, as a rule, any prototype encompassing all variants of a multi should not only specify types big e

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-28 Thread TSa
HaloO, Miroslav Silovic wrote: What bugs me is a possible duplication of functionality. I believe that declarative requirements should go on roles. And then packages could do them, like this: package Foo does FooMultiPrototypes { ... } I like this idea because it makes roles the central bea

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-28 Thread Miroslav Silovic
Aaron Sherman wrote: I certainly hope not, as I agree with you! That's not the goal at all, and in fact if that were a side effect, I would not want this to be implemented. The idea of having types AT ALL for protos was something that I threw in because it seemed to make sense at the end. The re

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-27 Thread Aaron Sherman
Trey Harris wrote: In a message dated Wed, 27 Sep 2006, Aaron Sherman writes: Any thoughts? I'm still thinking about the practical implications of this... but what immediately occurs to me: The point of multiple, as opposed to single, dispatch (well, one of the points, and the only point t

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-27 Thread Jonathan Lang
Minor nitpick: Any types used will constrain multis to explicitly matching those types or compatible types, so: our Int proto max(Seq @seq, *%adverbs) {...} Would not allow for a max multi that returned a string (probably not a good idea). IIRC, perl 6 doesn't pay attention to the le

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-27 Thread Trey Harris
n do max, and not on anything that can't. Following that observation to its logical conclusion, at some point we get to the core containing prototypes like: our proto max(Maxable $container) our proto sort(Sortable $container) our proto keys(Keyable $container) which (I think) results i

RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-27 Thread Aaron Sherman
Executive summary: I suggest a signature prototype that all multis defined in or exported to the current namespace must match (they match if the proto would allow the same argument list as the multi, though the multi may be more specific). Prototypes are exportable. Documentation tie-ins are

Re: [perl #37512] [PATCH] Adds nci support for 'T' and 'L' prototypes

2005-10-25 Thread Leopold Toetsch
On Oct 25, 2005, at 23:32, Nick Glencross wrote: I was looking at callbacks the other evening. Am I right in thinking that only two callback prototypes are supported, or have I missed a trick there as well? That's right. There are 2 callbacks (functions with 2 arguments only), one wit

Re: [perl #37512] [PATCH] Adds nci support for 'T' and 'L' prototypes

2005-10-25 Thread Nick Glencross
Leopold Toetsch via RT wrote: On Oct 23, 2005, at 17:08, Nick Glencross (via RT) wrote: Guys, call_list.txt lists 'T' and 'L' as being prototypes for passing arrays to nci functions, but no implementation exists in build_nativecall.pl. This patch provides an implementa

Re: [perl #37512] [PATCH] Adds nci support for 'T' and 'L' prototypes

2005-10-23 Thread Leopold Toetsch
On Oct 23, 2005, at 17:08, Nick Glencross (via RT) wrote: Guys, call_list.txt lists 'T' and 'L' as being prototypes for passing arrays to nci functions, but no implementation exists in build_nativecall.pl. This patch provides an implementation, as well as new tests. I d

[perl #37512] [PATCH] Adds nci support for 'T' and 'L' prototypes

2005-10-23 Thread via RT
# New Ticket Created by Nick Glencross # Please include the string: [perl #37512] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=37512 > Guys, call_list.txt lists 'T' and 'L' as being prototypes

[CVS ci] exceptions-1: classes, ops, prototypes

2003-07-10 Thread Leopold Toetsch
I couldn't resist start playing with exceptions. So I've put in some opcodes, 2 new classes - no functionality yet. Have fun, leo

Re: Prototypes

2002-08-16 Thread Dan Sugalski
At 10:29 PM +0100 8/13/02, Piers Cawley wrote: >I'd also like to be able to generate parrot code from within parrot >and immediately execute it... Working on the specs for that. Should be out soon... -- Dan --"it's lik

Re: Prototypes

2002-08-13 Thread Daniel Grunblatt
On Tue, 13 Aug 2002, John Porter wrote: > Piers Cawley wrote: > > I'd also like to be able to generate parrot code from within parrot > > and immediately execute it... > > Something like that will be needed for eval() anyway, right? Yes, like PDB_eval() may be... Daniel Grunblatt.

Re: Prototypes

2002-08-13 Thread John Porter
Piers Cawley wrote: > I'd also like to be able to generate parrot code from within parrot > and immediately execute it... Something like that will be needed for eval() anyway, right? -- John Douglas Porter

Re: Prototypes

2002-08-13 Thread Daniel Grunblatt
On 13 Aug 2002, Piers Cawley wrote: > Melvin Smith <[EMAIL PROTECTED]> writes: > > > At 06:56 PM 8/12/2002 +0100, Simon Cozens wrote: > > >Here's a more interesting question: which parts of Parrot are > > >enshrined, and which are prototypes, ready to b

Re: Prototypes

2002-08-12 Thread Dan Sugalski
At 11:10 PM -0400 8/12/02, Melvin Smith wrote: >At 06:56 PM 8/12/2002 +0100, Simon Cozens wrote: >>Here's a more interesting question: which parts of Parrot are enshrined, >>and which are prototypes, ready to be thrown away? For instance, I'd >>say much of lang

Re: Prototypes

2002-08-12 Thread Dan Sugalski
ut really bad masters. > >Here's a more interesting question: which parts of Parrot are enshrined, >and which are prototypes, ready to be thrown away? For instance, I'd >say much of languages/* is all proof-of-concept prototype stuff; imcc >may not be. The assembler I'd cal

Re: Prototypes

2002-08-12 Thread Melvin Smith
At 06:56 PM 8/12/2002 +0100, Simon Cozens wrote: >Here's a more interesting question: which parts of Parrot are enshrined, >and which are prototypes, ready to be thrown away? For instance, I'd >say much of languages/* is all proof-of-concept prototype stuff; imcc >may not

Re: Prototypes

2002-08-12 Thread Daniel Grunblatt
On 12 Aug 2002, Simon Cozens wrote: > [EMAIL PROTECTED] (Daniel Grunblatt) writes: > > Oh, no, I was talking about languages/parrot_compiler/. Sorry. > > Oh, I hadn't seen that. I can't work out what it is; it seems to be a > device for generating "Couldn't find operator" errors. Is there any, >

Re: Prototypes

2002-08-12 Thread Simon Cozens
[EMAIL PROTECTED] (Daniel Grunblatt) writes: > Oh, no, I was talking about languages/parrot_compiler/. Sorry. Oh, I hadn't seen that. I can't work out what it is; it seems to be a device for generating "Couldn't find operator" errors. Is there any, dare I say it, documentation for it? -- Going

Re: Prototypes

2002-08-12 Thread Daniel Grunblatt
On 12 Aug 2002, Simon Cozens wrote: > [EMAIL PROTECTED] (Daniel Grunblatt) writes: > > The assembler is a bit outdated, it shouldn't be too difficult to bring it > > up to date, I just don't have enough time latetly. But it did work fine > > and is easy to extend it. Why do you think it should be

Re: Prototypes

2002-08-12 Thread Simon Cozens
[EMAIL PROTECTED] (Daniel Grunblatt) writes: > The assembler is a bit outdated, it shouldn't be too difficult to bring it > up to date, I just don't have enough time latetly. But it did work fine > and is easy to extend it. Why do you think it should be thrown away? It's in Perl? -- MISTAKES:

Re: Prototypes

2002-08-12 Thread Daniel Grunblatt
On 12 Aug 2002, Simon Cozens wrote: > Here's a more interesting question: which parts of Parrot are enshrined, > and which are prototypes, ready to be thrown away? For instance, I'd > say much of languages/* is all proof-of-concept prototype stuff; imcc > may not be. Th

Prototypes

2002-08-12 Thread Simon Cozens
ch parts of Parrot are enshrined, and which are prototypes, ready to be thrown away? For instance, I'd say much of languages/* is all proof-of-concept prototype stuff; imcc may not be. The assembler I'd call a prototype. The regex engine? The GC? ... -- 10. The Earth quakes and the heavens

[PATCH] Generate xxx_class_init prototypes too [APPLIED]

2002-01-22 Thread Andy Dougherty
This quiets a few more gcc warnings. (I've already applied it.) diff -r -u parrot-cvs/classes/pmc2c.pl parrot-andy/classes/pmc2c.pl --- parrot-cvs/classes/pmc2c.pl Mon Jan 21 20:04:53 2002 +++ parrot-andy/classes/pmc2c.plTue Jan 22 11:43:10 2002 @@ -249,6 +249,9 @@ unless (exists $fla

Re: [patch] add missing prototypes.

2002-01-01 Thread Dan Sugalski
At 02:33 PM 1/1/2002 -0500, Josh Wilmes wrote: >I don't know if these functions might be obsolete, but here's a >simple patch to add the missing prototypes if they are not. Applied, thanks. Dan -

[patch] add missing prototypes.

2002-01-01 Thread Josh Wilmes
I don't know if these functions might be obsolete, but here's a simple patch to add the missing prototypes if they are not. Fixes this warning: register.c:429: warning: no previous prototype for `Parrot_push_on_stack' register.c:436: warning: no previous prototype for `Parro

Re: Prototypes

2001-09-04 Thread Damian Conway
Bryan wrote: > > > Er, scratch this. Blows up if the sub isn't prototyped. A much > > > *better* way is to make the prototype of any sub a property > > > (trait) of that sub. We can always query for a property. > > > > This is possible now: > > $foo = sub ($) { print "hello wor

Re: Prototypes

2001-09-04 Thread Bryan C . Warnock
On Tuesday 04 September 2001 11:17 am, Garrett Goebel wrote: > > Er, scratch this. Blows up if the sub isn't prototyped. A > > much *better* way is to make the prototype of any sub a > > property (trait) of that sub. We can always query for a > > property. > > This is possible now: > > $foo = s

RE: Prototypes

2001-09-04 Thread Garrett Goebel
From: Bryan C. Warnock [mailto:[EMAIL PROTECTED]] > > On Monday 03 September 2001 11:56 pm, Bryan C. Warnock wrote: > > The third value is a "peek" value. Do the runtime > > checking, but don't do any magic variable stuff. As a > > matter of fact, don't run any user-code at all. Simply > > re

Re: Prototypes

2001-09-04 Thread Bryan C . Warnock
On Monday 03 September 2001 11:56 pm, Bryan C. Warnock wrote: > The third value is a "peek" value. Do the runtime checking, but don't do > any magic variable stuff. As a matter of fact, don't run any user-code at > all. Simply return a true or false value if the arguments *would* match. > (This

Re: Prototypes

2001-09-03 Thread Damian Conway
> > Are prototypes going to be checked at runtime now? > > For methods, at least. Dunno about subs, that's Larry's call. I > could make a good language case for and against it. It adds > overhead on sub calls, which is a bad thing generally. I

Re: Prototypes

2001-09-03 Thread Damian Conway
> But since the current prototyping system... has a highly positive > pressure gradient compared to the surrounding air, Well...I think it's more a problem of "I do no' thin' dat word means wha' you thin' it means". People want prototypes to b

Re: Prototypes

2001-09-03 Thread Dan Sugalski
At 11:47 PM 9/3/2001 -0400, Ken Fox wrote: >"Bryan C. Warnock" wrote: > > { > > my $a = sub ($$) { code }; > > gork($a); > > } > > > > sub gork { > > my ($a) = shift; > > $a->(@some_list); # <- Here > >

Re: Prototypes

2001-09-03 Thread Bryan C . Warnock
A few more ideas to put down, lest I lay wake all night, thoughts churning... One. Presumably, there will be an op for the actual calling of the subroutine. That op can take an (extra) argument, with one of three values, that the prototype checking can get to. The first value indicates that th

Re: Prototypes

2001-09-03 Thread Ken Fox
"Bryan C. Warnock" wrote: > { > my $a = sub ($$) { code }; > gork($a); > } > > sub gork { > my ($a) = shift; > $a->(@some_list); # <- Here > } > > The reason prototypes aren't checked at "Here" is because there

Re: Prototypes

2001-09-03 Thread Bryan C . Warnock
, where compile-time checking isn't possible. { my $a = sub ($$) { code }; gork($a); } sub gork { my ($a) = shift; $a->(@some_list); # <- Here } The reason prototypes aren't checked at "Here" is because there really isn't a way to know what the proto

Re: Prototypes

2001-09-03 Thread Dan Sugalski
At 10:32 PM 9/3/2001 -0400, Bryan C. Warnock wrote: >On Monday 03 September 2001 10:27 pm, Dan Sugalski wrote: > > >To me, that seems only a language decision. This could certainly handle > > >that. > > > > Ah, but calling in the first way has two PMCs in as parameters, while the > > second has o

Re: Prototypes

2001-09-03 Thread Bryan C . Warnock
On Monday 03 September 2001 10:27 pm, Dan Sugalski wrote: > >To me, that seems only a language decision. This could certainly handle > >that. > > Ah, but calling in the first way has two PMCs in as parameters, while the > second has only one. Potentially at least. A world of difference there. A

Re: Prototypes

2001-09-03 Thread Dan Sugalski
At 10:17 PM 9/3/2001 -0400, Bryan C. Warnock wrote: >On Monday 03 September 2001 09:30 pm, Dan Sugalski wrote: > > A clever idea, and one I'd not though of. That's probably the best way to > > do it. Has some other issues, like do we allow prototypes like: > > >

Re: Prototypes

2001-09-03 Thread Bryan C . Warnock
On Monday 03 September 2001 09:30 pm, Dan Sugalski wrote: > A clever idea, and one I'd not though of. That's probably the best way to > do it. Has some other issues, like do we allow prototypes like: > >sub foo ($$) {}; > > to be called as: > >foo(@bar)

Re: Prototypes

2001-09-03 Thread Dan Sugalski
At 10:11 PM 9/2/2001 -0400, Bryan C. Warnock wrote: >On Sunday 02 September 2001 07:49 pm, Dan Sugalski wrote: > > On Sun, 2 Sep 2001, Bryan C. Warnock wrote: > > > Are prototypes going to be checked at runtime now? > > > > For methods, at least. Dunno about subs

Re: Prototypes

2001-09-02 Thread Bryan C . Warnock
On Sunday 02 September 2001 07:49 pm, Dan Sugalski wrote: > On Sun, 2 Sep 2001, Bryan C. Warnock wrote: > > Are prototypes going to be checked at runtime now? > > For methods, at least. Dunno about subs, that's Larry's call. I could make > a good language case for and

Re: Prototypes

2001-09-02 Thread Dan Sugalski
On Sun, 2 Sep 2001, Bryan C. Warnock wrote: > Are prototypes going to be checked at runtime now? For methods, at least. Dunno about subs, that's Larry's call. I could make a good language case for and against it. It adds overhead on sub calls, which is a bad thing generally. (I

Re: Prototypes

2001-09-02 Thread Bryan C . Warnock
On Sunday 02 September 2001 08:18 pm, Michael G Schwern wrote: > On Sun, Sep 02, 2001 at 07:47:37PM -0400, Bryan C. Warnock wrote: > > Are prototypes going to be checked at runtime now? > > > > The following parses, but doesn't do anything, including warn. >

Re: Prototypes

2001-09-02 Thread Michael G Schwern
On Sun, Sep 02, 2001 at 07:47:37PM -0400, Bryan C. Warnock wrote: > Are prototypes going to be checked at runtime now? > > The following parses, but doesn't do anything, including warn. > > my $a = sub ($) { print }; Warning because you said you take an argument and then

Prototypes

2001-09-02 Thread Bryan C . Warnock
Are prototypes going to be checked at runtime now? The following parses, but doesn't do anything, including warn. my $a = sub ($) { print }; -- Bryan C. Warnock [EMAIL PROTECTED]

RFC 309 (v1) Allow keywords in sub prototypes

2000-09-25 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Allow keywords in sub prototypes =head1 VERSION Maintainer: Simon Cozens <[EMAIL PROTECTED]> Date: 25 Sep 2000 Mailing List: [EMAIL PROTECTED] Number: 309 Version: 1 Status: Developing

RFC 298 (v1) Make subroutines' prototypes accessible from Perl

2000-09-25 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Make subroutines' prototypes accessible from Perl =head1 VERSION Maintainer: Simon Cozens <[EMAIL PROTECTED]> Date: 25 Sep 2000 Mailing List: [EMAIL PROTECTED] Number: 298 Version:

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-21 Thread Graham Barr
On Thu, Sep 21, 2000 at 03:38:59AM -0600, Tom Christiansen wrote: > > > Could the prototype people please report whether Tim Bunce's issues with > > > prototypes have been intentionally/adequately addressed? > > >I'm not a prototype person (in fact RFC

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-21 Thread Tom Christiansen
> > Could the prototype people please report whether Tim Bunce's issues with > > prototypes have been intentionally/adequately addressed? >I'm not a prototype person (in fact RFC 128 makes it a hanging offence >to use that confusing word in connection with

Re: 'Markers'/RFC prototypes

2000-09-19 Thread Piers Cawley
Adam Turoff <[EMAIL PROTECTED]> writes: > On Tue, Sep 19, 2000 at 08:47:11AM +0100, Piers Cawley wrote: > > > That *shouldn't* be hard. If you're getting hung up on details like > > > =over 4, =item, L<> and C<>, then leave them out. > > > > No, I'm getting hung up on the fact that it'll take

Re: 'Markers'/RFC prototypes

2000-09-19 Thread Adam Turoff
On Tue, Sep 19, 2000 at 08:47:11AM +0100, Piers Cawley wrote: > > That *shouldn't* be hard. If you're getting hung up on details like > > =over 4, =item, L<> and C<>, then leave them out. > > No, I'm getting hung up on the fact that it'll take a bunch of time to > flesh out the RFCs beyond a s

Re: 'Markers'/RFC prototypes

2000-09-19 Thread Piers Cawley
Adam Turoff <[EMAIL PROTECTED]> writes: > On Mon, Sep 18, 2000 at 10:18:41AM -0600, Nathan Torkington wrote: > > Piers Cawley writes: > > > The idea here is to allow people to get ideas on the lists in a rough > > > form where they can get some initial comments (which may blow the > > > 'real' RF

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-18 Thread Damian Conway
2)] } sub foo ( ($key, \%hash) : repeat{1,} ) {...} # or: sub foo ( ($key, HASH $hashref) : repeat{1,} ) {...} > confess "values must be Frobulants" >if grep { $_->isa("Frobulant") }, @_[map {1+2*$_} 0.. int($#_/2)] } sub foo ( (Frobulant $key, $va

Re: 'Markers'/RFC prototypes

2000-09-18 Thread Adam Turoff
On Mon, Sep 18, 2000 at 10:18:41AM -0600, Nathan Torkington wrote: > Piers Cawley writes: > > The idea here is to allow people to get ideas on the lists in a rough > > form where they can get some initial comments (which may blow the > > 'real' RFC out of the water...). There should be some very s

Re: 'Markers'/RFC prototypes

2000-09-18 Thread Nathan Torkington
Piers Cawley writes: > The idea here is to allow people to get ideas on the lists in a rough > form where they can get some initial comments (which may blow the > 'real' RFC out of the water...). There should be some very strict > rules about how soon the 'real' RFC arrives though. Why do you nee

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-18 Thread Tom Christiansen
yntax for such :-) but what about compile-time versus run-time issues? Could the prototype people please report whether Tim Bunce's issues with prototypes have been intentionally/adequately addressed? --tom

'Markers'/RFC prototypes

2000-09-18 Thread Piers Cawley
With the deadline for new RFCs fast approaching I've got a couple or three RFCs that I won't have time to get properly written in the time available, and I'm sure I'm not alone. Therefore, I propose that we be allowed to submit RFC prototypes of the form: =head1 TITLE

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-17 Thread Bart Lateur
On 16 Sep 2000 22:11:25 -0400, Chaim Frenkel wrote: >BL>sub min { >BL>my $min = shift; > > >As I proposed, @_ would flatten the incoming arguments. > >But a sub with a prototype (that includes a non-trailing '@') would then >be able to see the raw arguments. OK. As long as flattenin

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-17 Thread Chaim Frenkel
> "BL" == Bart Lateur <[EMAIL PROTECTED]> writes: BL> I'll give one example. BL> sub min { BL> my $min = shift; As I proposed, @_ would flatten the incoming arguments. But a sub with a prototype (that includes a non-trailing '@') would then be able to see the raw arguments.

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-11 Thread Damian Conway
> Does the prototype help guide the decision that it is a block and not > an anon-hash? Yes, as it does now in the existing prototype mechanism. For example: use Data::Dumper 'Dumper'; sub takes_block (&) { print "takes_block: ", Dumper $_[0] } sub takes_any

RE: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-11 Thread Damian Conway
> I'm under the impression that "&" used in a function prototype signifies > that the function takes a code block. That's right. As I said in another post, I'm functioning rather poorly just at the moment. :-( Damian

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-11 Thread Bart Lateur
On 11 Sep 2000 13:47:22 -0400, Chaim Frenkel wrote: >Sorry, I don't see list flattening as _fundemental_ to perl. It is >just the way it is currently done. Could you tell me how it could be >_fundemental_? I'll give one example. sub min { my $min = shift; foreach

RE: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-11 Thread Garrett Goebel
From: Damian Conway [mailto:[EMAIL PROTECTED]] >> >> my_while { pred() } { # don't gimme no Tcl flac. >> >> ... >> >> } # no semicolon needed here! >> >> DC> Just added to the RFC :-) >> >> How would the parser handle this? Some '}' would need > ';' some don't. > > Th

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-11 Thread Chaim Frenkel
> "DC" == Damian Conway <[EMAIL PROTECTED]> writes: >> How would the parser handle this? Some '}' would need ';' some don't. DC> The trailing C<&> parameter specification tells the parser that there DC> the last argument will be a raw block and that it need not be a followed DC> by a semicol

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-11 Thread Chaim Frenkel
egates without flattening, and without having to use reference syntax (@$foo), would fall out of Damian's "parameters once known as prototypes" RFC. I wonder why not going full LISP with nested lists would be that bad. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-10 Thread Damian Conway
> >> my_while { pred() } { # don't gimme no Tcl flac. > >> ... > >> } # no semicolon needed here! > > DC> Just added to the RFC :-) > > How would the parser handle this? Some '}' would need ';' some don't. The trailing C<&> parameter specification tells the parser that there

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-10 Thread Bart Lateur
On 10 Sep 2000 00:33:43 -0400, Chaim Frenkel wrote: >PS> Yes, please. I view the flattening of lists as a feature, not a bug, and >PS> it has made Perl a lot easier to understand IMHO. > >I view it as a mis-feature. I'm sorry to disagree. But flattening of argument lists is one of those things

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-09 Thread Chaim Frenkel
> "DC" == Damian Conway <[EMAIL PROTECTED]> writes: >> my_while { pred() } { # don't gimme no Tcl flac. >> ... >> } # no semicolon needed here! DC> Just added to the RFC :-) How would the parser handle this? Some '}' would need ';' some don't. -- Chaim Frenkel

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-09 Thread Chaim Frenkel
> "PS" == Peter Scott <[EMAIL PROTECTED]> writes: >> for ($x,$y,$z) (@a1,@a2,4..12,@a4) { ... } >> >> Probably we'll have to say that the user must explicitly zip if that >> is what is desired. PS> Yes, please. I view the flattening of lists as a feature, not a bug, and PS> it has made Pe

Re: Out-of-core format syntax (was Re: Globs, (brrr) scalar filehandles, prototypes.)

2000-08-30 Thread Buddha Buck
> Actually this is pretty cool, add a = and turn it into a variable > declaration: > >my format $FORMAT = <<'.'; > @, @ > $stuff, $junk > . > > And that looks pretty similar to Perl 5. ;-) Yah, but it's frought with the possibility of confusion. I can easily s

  1   2   >