Merge RFC's 107 and 118 (was Re: RFC 118 (v1) lvalue subs)

2000-08-17 Thread Nathan Wiger
Buddha Buck wrote: > > At 09:21 AM 8/17/00 -0700, Nathan Wiger wrote: > > >$cgi->param($var, @val); # traditional > >$cgi->param($var) = @val; # lvalue, but same thing > > > >The second one, then, just makes it more obvious what's going on. But it > >shouldn't change the behavio

Re: RFC 120 (v1) Implicit counter in C statements, possibly C<$#>.

2000-08-17 Thread John McNamara
On Wed, Aug 16, 2000 at 11:42:20AM -1000, Tim Jenness wrote: > What about: > > for (0..$#array) { > print $array[$i], " is at index ", $i, "\n"; > } > > I use that whenever I need to loop over indices of two arrays at once. I use it myself ;) Iterating over an array in terms of the arra

RFC 120 (v2) Implicit counter in for statements, possibly $#.

2000-08-17 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Implicit counter in for statements, possibly $#. =head1 VERSION Maintainer: John McNamara <[EMAIL PROTECTED]> Date: 16 Aug 2000 Last-Modified: 16 Aug 2000 Version: 2 Mailing List: [EMAIL PROTECTED

READ THIS: Take it to -objects! (was Re: RFC 126 (v1) Ensuring Perl's object-oriented future)

2000-08-17 Thread Nathan Wiger
Everyone: Please continue this discussion on -objects. Thanks. -Nate Perl6 RFC Librarian wrote: > > This and other RFCs are available on the web at > http://dev.perl.org/rfc/ > > =head1 TITLE > > Ensuring Perl's object-oriented future > > =head1 VERSION > > Maintainer: John Siracusa

Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, and wantarray() changes

2000-08-17 Thread Buddha Buck
At 05:49 AM 8/18/00 +1000, Damian Conway wrote: >And I keep pointing out that this is only one aspect of lvalue subroutines. >The point of an lvalue subroutine is not to make assignment to the return >value >work, it is to make the return value an *lvalue*. That's a much more general >thing, bec

RFC 95 (v2) Object Classes

2000-08-17 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Object Classes =head1 VERSION Maintainer: Andy Wardley <[EMAIL PROTECTED]> Date: 11 Aug 2000 Last Modified: 17 Aug 2000 Version: 2 Mailing List: [EMAIL PROTECTED] Number: 95 =head1

RFC 129 (v1) Replace default filehandle/select with $DEFOUT, $DEFERR, $DEFIN

2000-08-17 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Replace default filehandle/select with $DEFOUT, $DEFERR, $DEFIN =head1 VERSION Maintainer: Nathan Wiger <[EMAIL PROTECTED]> Date: 17 Aug 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number

Re: ANNOUNCE: Inline 0.23 (Mix Perl and C w/o XS)

2000-08-17 Thread Simon Cozens
In comp.lang.perl.announce, Brian Ingerson wrote: >Inline.pm allows a programmer to write C code directly inside a Perl >script and just run it. No XS, no SWIG, no make. Using Inline to write >extension modules for the CPAN is fully supported and just as easy. C++, >Fortran, Pascal, and Python are

Re: ANNOUNCE: Inline 0.23 (Mix Perl and C w/o XS)

2000-08-17 Thread Dan Sugalski
At 01:10 PM 8/17/00 +, Simon Cozens wrote: >In comp.lang.perl.announce, Brian Ingerson wrote: > >Inline.pm allows a programmer to write C code directly inside a Perl > >script and just run it. No XS, no SWIG, no make. Using Inline to write > >extension modules for the CPAN is fully supported a

Re: Multiway comparisons

2000-08-17 Thread John Porter
raptor wrote: > RFC 25 (v1): Multiway comparisons > ... > I think the idea of leaving the value "j" in "i > j" is cool... RFC 84. -- John Porter

Re: RFC 84 (v1) Replace => (stringifying comma) with =>

2000-08-17 Thread John Porter
Chaim Frenkel wrote: > > In a hash exists() is a valid concept. In an array (even a sparse one) > exists() has no meaning. The data is always there. The sparsity is > an implementational detail. WADR, exists() could -- even if it doesn't currently -- have a defined meaning for arrays: m

Re: RFC 112 (v1) Assignment within a regex

2000-08-17 Thread Kevin Walker
I think hash assignment within regex's would be more useful than variable assignment (though there's no reason there couldn't be both, I suppose). Here's a copy of something I sent to p5p a while back: I suggest that (?%field_name: pattern) spit out 'field_name', in addition to the matched p

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread Karl Glazebrook
To go through a few points that has arisen: o Why do I think "@" is useless? OK clearly @x is a list. Good old perl4. But what is $x[3] ? It could be a scalar. BUT it could be a reference to a list. It could be a reference to a 2D PDL image. etc. so clearly we have no real i

Re: RFC 82 (listops in list context)

2000-08-17 Thread Nathan Torkington
Chaim Frenkel writes: > The other magic variables would simply end up as some funny 8-bit > characters floating around. With one's handy (several thousand page) > translation table one can then interpret the meaning. That's insane. We're trying to get rid of special variables named after obscure

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread Nathan Torkington
John Porter writes: > > push is _not_ a method. @var is not an object. > > You are deluded. This is a highly unproductive avenue of discourse. Let the people who want to drop punctuation propose dropping punctuation. Arguing about it won't change their mind, but it will (a) piss everyone of

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread John Porter
Ariel Scolnicov wrote: > John Porter <[EMAIL PROTECTED]> writes: > > foo = bar; > > > > foo could be just about anything: a string, a hashref, some other > > blessed ref (with op"=" possibly overloaded!), or even an lvalue sub. > > Do you know? Should you care? > > I don't know, but I think

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread John Porter
Mike Pastore wrote: > On Wed, 16 Aug 2000, John Porter wrote: > > grep() always treats its "second" arg as a list, even if it's a scalar, > > or some other list-of-one (or none); and grep() always returns a list, > > even if it's a list of one (or none). > > True on the first part, false on the s

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread John Porter
Jon Ericson wrote: > John Porter wrote: > > ...all variable types (scalar, array, hash) are simply objects. > > Not in Perl. Yes, in perl. > $dog and $cat are objects. $dog can bark and $cat can scratch. The > author of the module (Zoo::Animal?) should have documented these > methods. And

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread Ariel Scolnicov
John Porter <[EMAIL PROTECTED]> writes: > Ariel Scolnicov wrote: > > John Porter <[EMAIL PROTECTED]> writes: > > > foo = bar; > > > > > > foo could be just about anything: a string, a hashref, some other > > > blessed ref (with op"=" possibly overloaded!), or even an lvalue sub. > > > Do you k

Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, and wantarray() changes

2000-08-17 Thread Andy Wardley
On Aug 16, 8:21pm, Perl6 RFC Librarian wrote: > # this is perl6 > sub foo :lvalue ($new) { > $variable = $new; > } A nice idea, but one of the reasons for the original proposal was to make $foo->bar = $x; behave the same as: $foo->bar($x); Your proposal provides a neat solution

Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, and wantarray() changes

2000-08-17 Thread Nathan Wiger
Andy Wardley wrote: > > I'm inclined to say that assignments of the form: > > $foo->bar(@baz) = @boz; > > Are allowed, but just plain stupid. It's the same as: > > $foo->bar(@baz, @boz) > > and you're right, Perl can't tell the lvalues and rvalues apart. So > don't do that. I hate t

Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, and wantarray() changes

2000-08-17 Thread Chaim Frenkel
As Graham pointed out, is an lvalue sub supposed to act like a tie or like a variable. If it acts like a variable it can't be a gatekeeper. Hmm, what if the sub gets a chance to look at the value before acting. Checks the value. If good returns a reference to the correct variable to save it in.

Re: $!

2000-08-17 Thread Jarkko Hietaniemi
On Thu, Aug 17, 2000 at 09:19:20AM -0700, Peter Scott wrote: > Do we want to come up with any modifications to the scope of $! (I'm not > talking about the dual string-number nature)? I've occasionally been > flummoxed by looking at it when there hadn't really been an error (but it's > set any

RE: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread Myers, Dirk
Karl Glazebrook wrote: > But what is $x[3] ? > It could be a scalar. > BUT it could be a reference to a list. > It could be a reference to a 2D PDL image. ... but references are scalar. So, $x[3] *is* a scalar. That scalar could be a reference to a list. It could be a reference to a 2D

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread Karl Glazebrook
"Myers, Dirk" wrote: > > Karl Glazebrook wrote: > > > But what is $x[3] ? > > > It could be a scalar. > > > BUT it could be a reference to a list. > > > It could be a reference to a 2D PDL image. > > ... but references are scalar. So, $x[3] *is* a scalar. > > That scalar could be a refe

Re: RFC 104 (v1) Backtracking :ref

2000-08-17 Thread raptor
=head1 REFERENCE Icon language brief intro : http://www.cs.arizona.edu/icon/intro.htm

Re: Permanent sublists (was Re: Language WG report, August 16th2000)

2000-08-17 Thread Ask Bjoern Hansen
On Wed, 16 Aug 2000, Peter Scott wrote: [...] > >Ask, can you change the deadlines on these lists to be "as long as it > >takes" or similar? > > Sorry I didn't chime in earlier, but I would like to say that I prefer > published deadlines. Reason: people will talk for as long as you give > 'em

Re: pascal-like "with" was Re: Default filehandles(was Re: commandline option: $|++)

2000-08-17 Thread Dave Storrs
D'oh. s{2) .+^}{} Mismatch between brain and fingers there somewhere, thanks for pointing it out. Dave On 17 Aug 2000, Johan Vromans wrote: > Dave Storrs <[EMAIL PROTECTED]> writes: > > > 2) "express" should guarantee that, before it creates a v

Re: pascal-like "with" was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread Dave Storrs
This seems good...the HOF stuff seems to have pretty well accepted, and the thumbtack notation with it. Dave On Thu, 17 Aug 2000, Clayton Scott wrote: > > > On Wed, 16 Aug 2000, David L. Nicol wrote: > > > %record = loadrecord($studentID); > > > with %record

Re: Ideas that need RFCs?

2000-08-17 Thread Jonathan Scott Duff
On Thu, Aug 17, 2000 at 01:07:30PM -0400, Stephen P. Potter wrote: > * Replace C, C, and C with equivalent regularized > functions that take mulitple arguments instead of using specialized > syntax. It would be best if the names could be more "complete", like > match(), translate(), and sub

Re: RFC 114 (v1) Perl resource configuration

2000-08-17 Thread Hildo Biersma
Steve Simmons wrote: > > On Wed, Aug 16, 2000 at 08:03:31PM -, Perl6 RFC Librarian wrote: > > > Perl should provide a mechanism to have common code autoloaded from a > > file. . . . > > > A C file could be used to set system-wide defaults that > > the system administrator would like to prom

Re: RFC 114 (v1) Perl resource configuration

2000-08-17 Thread Hildo Biersma
> =head1 DESCRIPTION > > Many other programs have so called "resource configuration" files (at > least that's what I call them) that are loaded and interpretted upon > program startup. Some example programs that have this ability include > bash, mutt, and python. Perl should do the same. > > A

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread Ariel Scolnicov
John Porter <[EMAIL PROTECTED]> writes: > Bryan C. Warnock wrote: > > > > Composer::Post.assumes(Iterator.each(Iterator.all(List)=="Programmers") > > ->programs=(Language::Programming.uses("Perl")==true && > > Methodology.implemented(Style.OO==true,Time.all==true)))==true; > > Not at al

Re: RFC 104 (v1) Backtracking:example

2000-08-17 Thread raptor
hi jeremy, all, here is one simple example , let say we have this XML file: how we can implement the following XPath expression - "file://code" I'm giving here very simplified example (orthen works as shown in first interpretation i

Re: RFC 104 (v1) Backtracking

2000-08-17 Thread raptor
hi, > > So how is that different from: > > > > do BLOCK1 until do BLOCK2 > > It's the same. > But the real fun starts when blocks and functions can suspend and > resume. > >{ ... > # Return value and suspend. > suspend $i; > # Next iteration will resume here > ... >} a

Re: RFC 76 (v1) Builtin: reduce

2000-08-17 Thread Ariel Scolnicov
Nathan Torkington <[EMAIL PROTECTED]> writes: > Piers Cawley writes: > > > > The $a and $b of the sort comparator were A Bad Idea to begin with. > > > > > > Ditto. Can we ditch these in Perl 6? Don't see why $_[0] and $_[1] can't > > > be used, or even a more standard $1 and $2. Either one makes

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread Steve Fink
Ted Ashton wrote: > > Thus it was written in the epistle of Russ Allbery, > > > > This falls firmly in the category of things that are powerful for > > experienced users of the language but may be somewhat difficult to learn. > > I don't think Perl has being easy to learn as it's primary goal, no

Re: pascal-like "with" was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread John Porter
Dave Storrs wrote: > On 17 Aug 2000, Johan Vromans wrote: > > Dave Storrs <[EMAIL PROTECTED]> writes: > > > > > 2) "express" should guarantee that, before it creates a variable > > > names $FOO, it first calls "local" on any existing $FOO > > > > Why, if the variable is lexical (see 3)? > > D

Re: RFC 39 (v2) Perl should have a print operator

2000-08-17 Thread Jon Ericson
Nathan Wiger wrote: > We should consider if this *adds value* to Perl 6. If not, we should > start trimming down some RFC's and retracting them. If this RFC presents > a significant win, we should keep it. If not (I personally don't see > one), we should retract it. > > I'm not claiming to be aut

Re: Line disciplines (was Re: RFC 69 (v3) Standardize input record separator)

2000-08-17 Thread Bart Lateur
On Wed, 16 Aug 2000 07:39:33 -0700 (PDT), Dave Storrs wrote: > The idea of having two different regex "languages" in Perl makes >me very, very nervous. Potential for confusion It should. However, I was talking about two different rgex implementations, not two different languages. I woul

Re: RFC 39 (v2) Perl should have a print operator

2000-08-17 Thread Nathan Wiger
Jon Ericson wrote: > > I think this is a little premature. These are Requests For Comments not > Suggestions To Larry yet. So far, you have been to only person to offer > constructive criticism on this RFC. I think that it is a very small win > at the moment, but this is not the RFC's final fo

Re: $!

2000-08-17 Thread Peter Scott
At 10:11 AM 8/17/00 -0700, Larry Wall wrote: >Peter Scott writes: >: Do we want to come up with any modifications to the scope of $! (I'm not >: talking about the dual string-number nature)? I've occasionally been >: flummoxed by looking at it when there hadn't really been an error (but it's >: s

yoda 2 clarifications Re: AUTOLOAD in terms of throw

2000-08-17 Thread David L. Nicol
I had been thinking of some special goto labels, things like BEGINNING and END which would signify the beginning and end of the block enclosing the throw; perhaps every SCOPE object could have these labels refered to in terms of them. inside a C we need to have access to a lot of internal flow d

Re: Draft 1 of RFC 88 version 2.

2000-08-17 Thread Peter Scott
At 06:10 AM 8/17/00 -0600, Tony Olekshy wrote: >catch "Error::DB" { ... } > > catch [ "Error::DB", "Error:IO" ] { ... } > > trap { $@->{message} =~ /divide by 0/ } catch { ... } I don't think you need another keyword here. Just support an expression argument to catch and you can do

Re: AUTOLOAD in terms of throw

2000-08-17 Thread Glenn Linderman
"David L. Nicol" wrote: > What I was suggesting was, if you want to overload the autoloading > of something, it could be done with "catch" instead of rewriting > the ::OVERLOAD procedure, for that module. > > "method not loaded" becomes an exception which is thrown, rather > than "AUTOLOADING" b

Re: Design by Contract for perl internals

2000-08-17 Thread Nick Ing-Simmons
Michael G Schwern <[EMAIL PROTECTED]> writes: > >I wouldn't mind an optional OO contract system in the core of Perl, >but this may be a case of "why do it in core when a module will work?" I _think_ the proposal was to have design-by-contract in the perl core in the sense that contract is checked

RFC 121 (v1) linkable output mode

2000-08-17 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE linkable output mode =head1 VERSION Maintainer: David Nicol <[EMAIL PROTECTED]> Date: 17 Aug 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number: 121 =head1 ABSTRACT Perl5 offers a clunky in

RFC 125 (v1) Components in the Perl Core Should Have Well-Defined APIs and Behavior

2000-08-17 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Components in the Perl Core Should Have Well-Defined APIs and Behavior =head1 VERSION Maintainer: Bradley M. Kuhn <[EMAIL PROTECTED]> Date: 17 Aug 2000 Version: 1 Mailing List: [EMAIL PROTECTED]

Re: Design by Contract for perl internals

2000-08-17 Thread Michael G Schwern
On Thu, Aug 17, 2000 at 01:28:29PM -0400, Chaim Frenkel wrote: > I posted this to -qa and -internal, since I was suggesting this > for the internal development of perl. Not for the user visible > pieces. My mistake. For the internals, sounds like it couldn't hurt. Though I have no idea how put

RFC 127 (v1) Sane resolution to large function returns

2000-08-17 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Sane resolution to large function returns =head1 VERSION Maintainer: Jerrad Pierce <[EMAIL PROTECTED]> Date: 17 Aug 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number: 127 =head1 ABSTRACT Pe

Re: ANNOUNCE: Inline 0.23 (Mix Perl and C w/o XS)

2000-08-17 Thread Sam Tregar
On Thu, 17 Aug 2000, Nick Ing-Simmons wrote: > Simon Cozens <[EMAIL PROTECTED]> writes: > >Wow. I'm sold. Can this be how we should be doing XS in Perl 6? > So we now run equivalent of xsubpp and cc every time script is run? No. The documentation states that the compilation is done only when the

Re: RFC 127 (v1) Sane resolution to large function returns

2000-08-17 Thread Nathan Wiger
> As for single datum access, I C[index]> or > C{key}> should be considered. This however, is not the > core of this proposal. Merely a possibility. Just as extending the > inelegant metaphor above to C<{function()}->{key}> would become a > possibility. Personally, I think lists should always sta

Re: RFC 76 (v1) Builtin: reduce

2000-08-17 Thread Jeremy Howard
Ariel Scolnicov wrote: > Nathan Torkington <[EMAIL PROTECTED]> writes: > > $a and $b were done for speed: quicker to set up those global > > variables than to pass values through the stack. The documentation > > for perl5's sort function says that passing as arguments is > > considerably slower

.NET IL

2000-08-17 Thread Simon Cozens
I'm trying to find out some useful information on the Microsoft .NET Implementation Language, since everyone's raving about it and all I've seen is vapourware, glowing press releases and not a drop of code, and I'd rather see something a little more technical if it's what we're going to be targett

Re: .NET IL

2000-08-17 Thread Jeremy Howard
Simon Cozens wrote: > I'm trying to find out some useful information on the Microsoft .NET > Implementation Language, since everyone's raving about it and all I've > seen is vapourware, glowing press releases and not a drop of code, and > I'd rather see something a little more technical if it's wh

Re: Design by Contract for perl internals

2000-08-17 Thread Michael G Schwern
On Sun, Aug 13, 2000 at 07:16:41PM -0400, Chaim Frenkel wrote: > What do you think of creating a mechanism for attaching pre-, post-, > invariant conditions to the internals? I'd like to point out that two modules already do this. Class::Contract which was just unleashed by Damian Conway, and inv

Re: Design by Contract for perl internals

2000-08-17 Thread Simon Cozens
On Thu, Aug 17, 2000 at 07:03:13AM -0400, Michael G Schwern wrote: > I wouldn't mind an optional OO contract system in the core of Perl, > but this may be a case of "why do it in core when a module will work?" Isn't this rather a language issue? > Since OO contracts are typically turned off in

Re: Design by Contract for perl internals

2000-08-17 Thread Damian Conway
Michael wrote: > I wouldn't mind an optional OO contract system in the core of Perl, > but this may be a case of "why do it in core when a module will work?" > Since OO contracts are typically turned off in production code any > performance gains from adding it to the core wouldn't ma

Re: .NET IL

2000-08-17 Thread Bradley M. Kuhn
Simon Cozens wrote: > I'm trying to find out some useful information on the Microsoft .NET > Implementation Language, since everyone's raving about it and all I've > seen is vapourware, glowing press releases and not a drop of code, and > I'd rather see something a little more technical if it's wh

RFC 130 (v1) Transaction-enabled variables for Perl6

2000-08-17 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Transaction-enabled variables for Perl6 =head1 VERSION Maintainer: Szabó, Balázs <[EMAIL PROTECTED]> Date: 17 Aug 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number: 130 =head1 ABSTRACT Tran

Re: ANNOUNCE: Inline 0.23 (Mix Perl and C w/o XS)

2000-08-17 Thread Nick Ing-Simmons
Simon Cozens <[EMAIL PROTECTED]> writes: >>BEGIN {$c_code = &c_code_generator()} >>use Inline C => $c_code; # will die if code doesn't compile >>myfunc1(); >> >>greet('Ingy'); >>greet(42); >> >>use Inline C => <<'END_OF_C_CODE'; >> >>void gr

Re: ANNOUNCE: Inline 0.23 (Mix Perl and C w/o XS)

2000-08-17 Thread Jarkko Hietaniemi
On Thu, Aug 17, 2000 at 08:20:35PM +, Nick Ing-Simmons wrote: > Simon Cozens <[EMAIL PROTECTED]> writes: > >>BEGIN {$c_code = &c_code_generator()} > >>use Inline C => $c_code; # will die if code doesn't compile > >>myfunc1(); > >> > >>greet('Ingy'); > >>

RFC 128 (v2) Subroutines: Extend subroutine contexts to include name parameters and lazy arguments

2000-08-17 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Subroutines: Extend subroutine contexts to include name parameters and lazy arguments =head1 VERSION Maintainer: Damian Conway <[EMAIL PROTECTED]> Date: 18 August 2000 Last Modified: 18 August 2000

RFC 128 (v1) Subroutines: Extend subroutine contexts to include name parameters and lazy arguments

2000-08-17 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Subroutines: Extend subroutine contexts to include name parameters and lazy arguments =head1 VERSION Maintainer: Damian Conway <[EMAIL PROTECTED]> Date: 17 August 2000 Version: 1 Mailing List: [EMAI

Re: RFC 120 (v2) Implicit counter in for statements, possibly $#.

2000-08-17 Thread Christopher J. Madsen
I don't see why this should be an implicit counter. This (might) cause extra work for every foreach loop in every program (depending on how foreach is implemented). Why not use an explicit counter instead? Something like foreach $item $index (@array) { print $item, " is at index ", $

Re: RFC 120 (v2) Implicit counter in for statements, possibly $#.

2000-08-17 Thread Glenn Linderman
Could also use this for foreach $item $key ( %hash ) { print "$item is indexed by $key\n"; } "Christopher J. Madsen" wrote: > I don't see why this should be an implicit counter. This (might) > cause extra work for every foreach loop in every program (depending on > how foreach is impl

Re: ANNOUNCE: Inline 0.23 (Mix Perl and C w/o XS)

2000-08-17 Thread Colin Meyer
On Thu, Aug 17, 2000 at 08:20:35PM +, Nick Ing-Simmons wrote: > Simon Cozens <[EMAIL PROTECTED]> writes: > >>BEGIN {$c_code = &c_code_generator()} > >>use Inline C => $c_code; # will die if code doesn't compile > >>myfunc1(); > >> > >>greet('Ingy'); > >>

Re: RFC 130 (v1) Transaction-enabled variables for Perl6

2000-08-17 Thread David L. Nicol
I wrote a transaction-enabled database in perl 5, using fork() for my multithreading and flock() for my mutexes. It continues to work just fine. Threading gives us mutexes. Are you just saying that every variable should have its own mutex, and perl's = assignment operator should implicitly se

Re: RFC 130 (v1) Transaction-enabled variables for Perl6

2000-08-17 Thread Nathan Wiger
> We need to get a new keyword for defining such a variable, I think > "transaction" is too long, we could use "safe" for this reason. The proposal looks good. But isn't this more a language issue at this point? Seems like we'll have to figure out the behavior we want first. Also, "safe" i

Re: RFC 130 (v1) Transaction-enabled variables for Perl6

2000-08-17 Thread Chaim Frenkel
Nice thought. Actually, this or something like this might be helpful in maintainting invariants in the face of exceptions. Though this is a tough problem especially in the face of threads. Though versioned variables may be able to remove most of the locking issues and move it down into the commi

Re: RFC 83 (v2) Make constants look like variables

2000-08-17 Thread David L. Nicol
internally, how to do it: ASSIGNMENT, as in, Change-my-values-w/o-changing-my-type, is in the vtable for the object. When an object becomes constant, its ASSIGNMENT function gets replaced with $heres_what_it_gets_replaced_with=sub{ throw "ERROR-ASSIGNMENT-TO-CONSTANT

Re: RFC 83 (v2) Make constants look like variables

2000-08-17 Thread Jeremy Howard
> internally, how to do it: > > ASSIGNMENT, as in, Change-my-values-w/o-changing-my-type, > is in the vtable for the object. > > When an object becomes constant, its ASSIGNMENT function gets > replaced with > > $heres_what_it_gets_replaced_with=sub{ > throw "ERROR-ASSIGNMENT-TO-CONSTANT" > }; > >

Re: Line disciplines (was Re: RFC 69 (v3) Standardize input recordseparator)

2000-08-17 Thread Dave Storrs
Well, ok, one "language" is just a subset of the other (guess I didn't communicate that), but they are still distinct and still cause for concern. However, I think that if we're going to write this DFA at all, then the user SHOULD have the choice of using it for normal regex matchs, by specify

Re: filehandle objects et al.

2000-08-17 Thread Jerrad Pierce
>Well, fileobjects are already in Perl 5. Most people just don't use them >by default. But as TomC pointed out, in Perl 5 you can do this: > open $fh, "$file";# if 'use FileHandle' I do use them, occasionally... >Already. These proposals just make that the default. No the "default" is what

Re: RFC 39 (v2) Perl should have a print operator

2000-08-17 Thread Jonathan Scott Duff
On Thu, Aug 17, 2000 at 03:30:09PM -0700, Jon Ericson wrote: > Nathan Wiger wrote: > >3. Can you support here documents with this syntax? > > I haven't thought about this yet, but you can always use print. Should be the same: ><<'FOO' blah blah FOO< > >

Re: RFC 129 (v1) Replace default filehandle/select with $DEFOUT, $DEFERR, $DEFIN

2000-08-17 Thread Jon Ericson
Perl6 RFC Librarian wrote: > The new C<$DEFIN> accomplishes a similar thing, but with > input. Currently, the special <> filehandle acts on one of > two things, either C<@ARGV> or (if C<@ARGV> is > empty). This is not strictly true. <> is shorthand for . ARGV is the special filehandle that ope

Re: RFC 39 (v2) Perl should have a print operator

2000-08-17 Thread Jon Ericson
Jonathan Scott Duff wrote: > On Thu, Aug 17, 2000 at 03:30:09PM -0700, Jon Ericson wrote: > > Nathan Wiger wrote: > > >3. Can you support here documents with this syntax? > > > > I haven't thought about this yet, but you can always use print. > > Should be the same: > > ><<'FOO' >

filehandle objects et al.

2000-08-17 Thread Jerrad Pierce
In reply to your message from the not too distant future: next Thursday AD Reply-to: [EMAIL PROTECTED] Return-receipt-to: [EMAIL PROTECTED] Organization: a) Discordia b) none c) what's that? Content-Typo: gibberish, charset=ascii-art Date: Thu, 17 Aug 2000 18:05:33 EDT From: Jerrad Pierce >[1] T

Re: RFC 39 (v2) Perl should have a print operator

2000-08-17 Thread David L. Nicol
I like very much a print() that returns the value of what you printed rather than success. I am always needing to define littly intermediate temporaries so I can insert debugging code inside huge, tortuous expressions. I don't know if C(>"print me"<) is it though. Did you take a look at RFC 6

Re: RFC 39 (v2) Perl should have a print operator

2000-08-17 Thread Jon Ericson
Nathan Wiger wrote: > > > >"Print this line.\n"<; > > Some questions: > >1. How do you specify alternate filehandles to output to? > select() doesn't count for the purposes of this question. It's a shortcut, not a replacement. Rumors of select's death are greatly exaggerated. >

Re: filehandle objects et al.

2000-08-17 Thread Nathan Wiger
> I vehemently disagree with this filehandle object nonsense. > This is Perl, not Java, not Python. Everyone together Purrl... :-P Well, fileobjects are already in Perl 5. Most people just don't use them by default. But as TomC pointed out, in Perl 5 you can do this: open $fh, "$file";# i

Re: RFC 129 (v1) Replace default filehandle/select with $DEFOUT, $DEFERR, $DEFIN

2000-08-17 Thread Jon Ericson
Perl6 RFC Librarian wrote: > With C<$DEFERR>, all error functions are set to act on it > instead of C<$STDERR> by default. So, the Perl 6 version > of the above is replaced by a single, simple line of code > at the top of your main program: > >$DEFERR = $ERRORLOG unless $have_a_tty; open S

Re: RFC 99 (v2) Standardize ALL Perl platforms on UNIX epoch

2000-08-17 Thread Chris Nandor
Here are some comments from Matthias Neeracher, the MacPerl author, and a few comments from me. >To: Chris Nandor <[EMAIL PROTECTED]> >Subject: Re: Fwd: RFC 99 (v2) Standardize ALL Perl platforms on UNIX epoch >Date: Wed, 16 Aug 2000 07:31:25 +0200 >From: Matthias Ulrich Neeracher <[EMAIL PROTECT

Re: RFC 99 (v2) Standardize ALL Perl platforms on UNIX epoch

2000-08-17 Thread Russ Allbery
Chris Nandor <[EMAIL PROTECTED]> writes: > Here are some comments from Matthias Neeracher, the MacPerl author, and > a few comments from me. Cool, thanks. >> Is it? I thought DOS/Windows uses 1900, but I don't know what Perl on >> these platforms does. My understanding is that the native epoch

Multiway comparisons

2000-08-17 Thread raptor
RFC 25 (v1): Multiway comparisons and now snip from the Icon language : http://www.cs.arizona.edu/icon/docs/ipd266.htm 2.1 Conditional Expressions In Icon there are conditional expressions that may succeed and produce a result, or may fail and not produce any result. An example is the compariso

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread Steve Fink
Ted Ashton wrote: > > > But the most direct way to measure how well the > > language slides into people's heads is by seeing how hard it is for them > > to get the hang of it. > > Nope. I've yet to be convinced that "fits in your head" is the same as > "went in easily". Hang

Re: RFC 99 (v2) Standardize ALL Perl platforms on UNIX epoch

2000-08-17 Thread Philip Newton
On 16 Aug 2000, Chaim Frenkel wrote: > > "BB" == Buddha Buck <[EMAIL PROTECTED]> writes: > > BB> I am assuming that the system clocks are set accurately to UTC (or some > BB> derivative, like (US) Eastern Standard Time). UTC is what time-servers > BB> report. UTC has leap seconds, which a

Re: RFC 114 (v1) Perl resource configuration

2000-08-17 Thread Ariel Scolnicov
Jonathan Scott Duff <[EMAIL PROTECTED]> writes: > On Wed, Aug 16, 2000 at 01:07:24PM -0700, Peter Scott wrote: > > At 08:03 PM 8/16/00 +, Perl6 RFC Librarian wrote: > > >Perl should provide a mechanism to have common code autoloaded from a > > >file. > > > > Please, no. It's the ultimate sc

Re: RFC 111 (v1) Whitespace and Here Docs

2000-08-17 Thread Philip Newton
On Tue, 15 Aug 2000, Michael Fowler wrote: > So what's insufficient about: > > print <<"EOF"; > Stuff > More stuff > Even more stuff > EOF Others have already mentioned the "have to count the number of spaces" argument. Another one that comes to mind is: assu

Re: RFC 91 (v1) Builtin: partition

2000-08-17 Thread Stephen P. Potter
Lightning flashed, thunder crashed and "Jeremy Howard" <[EMAIL PROTECTED]> whispered: | No. They are lazily evaluated and require special optimisations to allow I don't completely understand this whole lazy evaluation, so I'm confused how these functions would work on them. Explain to me how you

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread Steve Fink
Karl Glazebrook wrote: > > Ariel Scolnicov wrote: > > > > Karl Glazebrook <[EMAIL PROTECTED]> writes: > > > > [...] > > > > > o Why do I think perl has too much line noise? Because of code like this: > > > > > > @{$x->{$$fred{Blah}}}[1..3] > > > > This is indeed horrible. However, I fail to se

Re: RFC 91 (v1) Builtin: partition

2000-08-17 Thread Jeremy Howard
Stephen P. Potter wrote: > Lightning flashed, thunder crashed and "Jeremy Howard" <[EMAIL PROTECTED]> whispered: > | No. They are lazily evaluated and require special optimisations to allow > > I don't completely understand this whole lazy evaluation, so I'm confused > how these functions would wo

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread Damien Neil
On Thu, Aug 17, 2000 at 03:10:44PM -0700, Steve Fink wrote: > My proposal would be what I implemented for perl5 a while back (Sarathy > didn't dislike it, but wasn't convinced enough to put it in): all > dereferencing can be done with ->. > > $x->@ is the same as @$x > $x->% is the same as %$x >

Re: pascal-like "with" was Re: Default filehandles(was Re: commandline option: $|++)

2000-08-17 Thread Dave Storrs
On Thu, 17 Aug 2000, John Porter wrote: > Huh? They need to be "globals", because the "with" mechanism > is going to have to be able to write them into a symbol table. > You can't do this with lexicals. (Well, maybe that'll be different > in perl6?) Well, if you're using the HOF nota

Re: RFC 124 (v1) Sort order for any hash

2000-08-17 Thread Tom Hughes
In message <[EMAIL PROTECTED]> Perl6 RFC Librarian <[EMAIL PROTECTED]> wrote: > A "sort function" will need to be added into the list of magics > maintained for every associative array. > > A set of macros in terms of sort will need to be defined which > replace keys, values, and each f

Re: RFC 123 (v1) Builtin: lazy

2000-08-17 Thread Tom Hughes
In message <[EMAIL PROTECTED]> Perl6 RFC Librarian <[EMAIL PROTECTED]> wrote: > Rather than indicating that lazy evaluation is required by the > addition of incomprehensible syntactic hints, a "lazy array context" > is indicated by the presence of the new keyword C. I think I've actual

Re: Ideas that need RFCs?

2000-08-17 Thread Decklin Foster
[replying from here since this is the only way I received it] > "Myers, Dirk" wrote: > > > > $line/pattern/ ; > > > /pattern/ ($line) ; I don't think these should be changed. Here's how I tend to pronouce things: $x = 'foo'; # "x gets foo" /bar/;# "match on bar"

Re: RFC 84 (v1) Replace => (stringifying comma) with =>

2000-08-17 Thread Uri Guttman
> "RA" == Russ Allbery <[EMAIL PROTECTED]> writes: RA> Damien Neil <[EMAIL PROTECTED]> writes: >> Arrays are ordered. Hashes are not. Sure, you can iterate over a hash, >> but add an element to one and you can change the order of everything in >> it. RA> Formally, I believe it's

Re: pascal-like "with" was Re: Default filehandles(was Re: commandline option: $|++)

2000-08-17 Thread Robert Mathews
Damian Conway wrote: > This: > > print < Dear ^name: > Your tuition is now due. Please send in a payment of at least > ^minumum. > SPAM > > already means: > > print sub { > return < Dear $_[0] > Your tuition is now

Re: Ideas that need RFCs?

2000-08-17 Thread Steve Fink
Nathan Wiger wrote: > > We're getting deluged with RFC's and emails. We should start thinking > "will this RFC or idea *add value* to Perl 6?". If not, and it just > makes something work differently, it _might_ not be worth an RFC. I disagree completely. For one thing, there's no such thing as P

  1   2   3   >