Re: Why consting is good

2006-08-13 Thread Johan Vromans
Andy Lester <[EMAIL PROTECTED]> writes: > const int days_per_month[] = > { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; > > You don't want to be able to do C, right? No, but C

Re: CPAN and META.yml: no_index dir vs directory

2006-07-05 Thread Johan Vromans
> > no_index/dir 13 > > no_index/directory 1397 > > private/directory40 > As for "dir", I'm three of the 13, I'm another three of the 13, and I'll switch to 'directory' as of the next upload. -- Johan

Re: [pugs]weird thing with say ++$

2005-04-21 Thread Johan Vromans
Paul Johnson <[EMAIL PROTECTED]> writes: > I think I understand the implementation details leading to each > behaviour, but rather than saying which was "right", I think I'd be > quite happy to see Perl6 copy (the ideas behind) C's rules regarding > sequence points and undefined behaviour. I'm no

Re: Unify cwd() [was: Re: $*CWD instead of chdir() and cwd()]

2005-04-21 Thread Johan Vromans
Chip Salzenberg <[EMAIL PROTECTED]> writes: > According to Michael G Schwern: >> In the same way that we have open() not fopen, fdopen, freopen... we >> can choose the safest and most sensible technique for determining >> the cwd and use that. > > And there is more than one open. Perl does have f

Re: :=: (OT)

2005-04-06 Thread Johan Vromans
Aaron Sherman <[EMAIL PROTECTED]> writes: > http://www.cs.tut.fi/~jkorpela/emacs-iso.html Coincidentally, last week the emacs developers decided to declare iso-accents mode (dated 1998) obsolete. Emacs 21 (out for several years now) has native support for language encodings. -- Johan

Re: Why a scoreboard?

2005-04-02 Thread Johan Vromans
Michael G Schwern <[EMAIL PROTECTED]> writes: > Has a README... check Bonus points if it differs from the stub, and additional bonus points if it really describes briefly what the product is. Rationale: When browsing READMEs they are often meaningless. > Declares a $VERSION...

Re: Test::META

2005-03-28 Thread Johan Vromans
Michael G Schwern <[EMAIL PROTECTED]> writes: > There is a create_makefile_pl option (see Module::Build::Compat) which > does a fair job of creating a Makefile.PL functionally equivalent to > your Build.PL. I'll definitely give it a try. Thanks. -- Johan

Re: Test::META

2005-03-28 Thread Johan Vromans
Michael G Schwern <[EMAIL PROTECTED]> writes: > Switch to Module::Build anyway. I would love to. But the last time I submitted a M::B-only module I was 'kindly urged' to provide a Makefile.PL as well, factually defeating the advantages of using M::B. Maintaining both a Build.PL and a Makefile.P

Re: testing non-modules

2005-03-07 Thread Johan Vromans
Yitzchak Scott-Thoennes <[EMAIL PROTECTED]> writes: > main() unless caller; I use this (and teach it in my trainings) as an easy way to insert some basic verification tests in modules. At the end of the module: unless ( caller ) { package main; ... insert test code ... } -- Johan

Re: testing non-modules

2005-03-06 Thread Johan Vromans
[Quoting Michael G Schwern, on March 6 2005, 10:32, in "Re: testing non-modu"] > Or if you want to be super portable you can do this: > > use Test::Output; > local @ARGV = qw(some args); > stdout_is( sub { do "bin/myprogram" }, 'wibble' ); > > Which has the nice side benefit of

Re: TAP docs

2005-02-21 Thread Johan Vromans
Andy Lester <[EMAIL PROTECTED]> writes: http://www.petdance.com/random/tap.html > Everyone: I still need more comments. Pete Krawczyk's the only one to > provide complaints yet. @ Test number 1..6 not ok ok not ok ok ok will generate FAILED tests 1, 3, 6

Re: Foreign modules in test scripts?

2005-02-21 Thread Johan Vromans
Andy Lester <[EMAIL PROTECTED]> writes: >> Is it ok for a CPAN module to use other modules from CPAN only for the >> test scripts (e.g. "Text::Diff")? > > Yes. See http://phalanx.kwiki.org/index.cgi?StandardDotTFiles for > examples of .t files that only run if a certain module is installed. Hmm.

Re: CLI signature?

2005-02-05 Thread Johan Vromans
Hi Juerd, [Quoting Juerd, on February 5 2005, 16:57, in "CLI signature?"] > signature ( > Rule $pattern, > bool +$help:short('h'), > Int +$verbose :short('v'), > Str [EMAIL PROTECTED] = <-> > ); The actual parsing still has to happen 'somewhere else'

Re: Module::Packaged vs Phalanx 100

2005-02-05 Thread Johan Vromans
Leon Brocard <[EMAIL PROTECTED]> writes: > This is what you get when you set Module::Packaged against the Phalanx > 100. So right now FreeBSD packages the most of Phalanx, and it's kinda > interesting to see the version numbers. > > There might be bugs, Definitely. I'm quite sure Getopt::Long is

Re: String interpolation

2004-07-22 Thread Johan Vromans
Larry Wall <[EMAIL PROTECTED]> writes: > : my $d="a"; > : print "--$d--{my $d = "b" }--$d--\n"; > > Yes, that is correct. I'm afraid things like this will keep many popular editors and IDEs from implementing perl6 support... -- Johan

Re: Compatibility with perl 5

2004-04-15 Thread Johan Vromans
"Gregor N. Purdy" <[EMAIL PROTECTED]> writes: > ... that I would be perfectly happy to be required to start all my > Perl 6 programs with "#!/usr/bin/perl6" instead of > "#!/usr/bin/perl", Ten years ago I was perfectly happy to start all my perl programs with /usr/bin/perl5. Today, I would be qui

Re: Load paths

2004-03-25 Thread Johan Vromans
Larry Wall <[EMAIL PROTECTED]> writes: > On Thu, Mar 25, 2004 at 12:12:12AM +0200, Jarkko Hietaniemi wrote: > : just system("rm -rf /;halt") > > Sorry, that won't work correctly, since the rm will remove the halt > program. Not necessarily. There's a chance it will remove 'rm' and 'rmdir' before

Re: Allison Randal is the new Project Manager

2004-02-19 Thread Johan Vromans
Nathan Torkington <[EMAIL PROTECTED]> writes: > Hi, folks. As has probably been obvious to most of you, I've been > really busy with my O'Reilly day job and haven't had time to attend to > Perl 6 and Parrot business. With no prompting, Allison Randal stepped > forward and has been taking on more

Re: Return of RE match

2002-10-07 Thread Johan Vromans
Dakkar <[EMAIL PROTECTED]> writes: > Hi! > I just found a strange behaviour in the current Perl6: > > print "Yes r\n" if "0" =~ /0/; > print "Yes s\n" if "0" =~ "0"; Here it prints "Yes r" and "Yes s" for perl = 5.6.0, 5.6.1, 5.8.0. GNU/Linux Redhat 7.2. -- Johan

Re: Customizable default hash and array values.

2001-09-28 Thread Johan Vromans
Michael G Schwern <[EMAIL PROTECTED]> writes: > so if $key does not exist you'll get 'some default' instead of undef. Except that a more common case is my $foo = $hash{foo} || 'some default'; my $bar = $hash{bar} || 'some other default'; -- Johan

Re: Deoptimizations

2001-09-02 Thread Johan Vromans
"Brent Dax" <[EMAIL PROTECTED]> writes: > sub FOO {"foo"} > print FOO; > > evaluating to: > > /-no--"foo"-\ > opt: FOO redefined? -< >---print > \-yes-call FOO--/ 'use constant FOO => "foo

Re: Perl 6 modules plan

2001-08-25 Thread Johan Vromans
John Siracusa <[EMAIL PROTECTED]> writes: > If you ask any Java programmer which is "correct", myJavaMethod() or > My_Java_Method(), I think you'll get a straight answer. >From experience I can assure you this is not the case. There are a couple of (independent and mutual inconsistent) style gui

Re: Perl 6 modules plan

2001-08-14 Thread Johan Vromans
Graham Barr <[EMAIL PROTECTED]> writes: > > > (1) Foo vs Foo_XS > > Why do they need to be named differently ? Only one will be installed. That is only possible if they have _identical_ APIs. -- Johan

Re: as long as we are discussing 'nice to have's...

2001-07-22 Thread Johan Vromans
Dave Storrs <[EMAIL PROTECTED]> writes: > I discovered today that I had forgotten to put 'use strict' at the top of > one of my modules...it was in the script that _used_ the module, but not > in the module itself. Putting it in instantly caught several annoying > bugs that I'd been trying to tr

Re: 'is' and action at a distance

2001-06-17 Thread Johan Vromans
Larry Wall <[EMAIL PROTECTED]> writes: > That's part of why I named it "btw" in the first place. The problem with > "prop" is it's not quite obscure enough. In the Netherlands, we have a value added tax named BTW. So it's not unlikely for financial programs to implement a btw property or method

Re: Apo2: \Q ambiguity

2001-05-07 Thread Johan Vromans
[Quoting Michael G Schwern, on May 6 2001, 22:58, in "Re: Apo2: \Q ambigui"] > Hmmm, maybe you can point out the "compose" key on my keyboard, I > can't find it. ;) Pick whatever you find convenient. I use the right control key. From my .Xmodmap: ! Compose key keycode 109 = Multi_key > I kn

Re: Apo2: \Q ambiguity

2001-05-06 Thread Johan Vromans
Larry Wall <[EMAIL PROTECTED]> writes: > Actually, my first thought a year or three ago was to replace qw() > with «», but we just aren't there with the Unicode editors yet. IIRW, German uses «» but French uses »« ... > I won't tell you what I had to go through just to get those two > character

Re: So, we need a code name...

2001-04-25 Thread Johan Vromans
Andy Dougherty <[EMAIL PROTECTED]> writes: > Starting with 'P' is useful so we can keep our acronyms such as PMC and > PDD :-). It's just an internal code name, so it probably doesn't matter if > it's taken for another purpose. PERIL (hi Tom!). -- Johan

Re: Larry's Apocalypse 1

2001-04-06 Thread Johan Vromans
Graham Barr <[EMAIL PROTECTED]> writes: > I have not looked at SelfTest, but I have always done this with > > unless (defined wantarray) { > # Self Test > } > > This works because whenever a file is use'd, require'd etc. it is > evaluated in a scalar context. The main file is in a void contex

Re: Schwartzian Transform

2001-03-21 Thread Johan Vromans
Adam Turoff <[EMAIL PROTECTED]> writes: > We're all for making easy things easy, but the complexities of > "map {} sort {} map {} @list" has always been befuddling to newbies, > especially when reading the code left-to-right. I've always thought that the purpose of the Schwartzian transform was

Re: ANNOUNCE: smokers@perl.org Discussion of perl's daily build and smoke test

2001-02-19 Thread Johan Vromans
As an active non-smoker, I'd appreciate a different name. -- Johan

Re: The binding of "my" (Re: Closures and default lexical-scope for subs)

2001-02-17 Thread Johan Vromans
John Porter <[EMAIL PROTECTED]> writes: > As someone else said before me, Perl should not be changed > Just Because We Can. Aspects which have proven usefulness and > are deeply engrained in the Perl mindset should not be tampered > with just because some recent convert finds them un-Algol-like

Re: "Art Of Unix Programming" on Perl

2001-02-10 Thread Johan Vromans
"Eric S. Raymond" <[EMAIL PROTECTED]> writes: > What *is* going on over there, anyway? It is unfortunately true that > the effort looks stalled from the outside. My concerns, exactly. -- Johan

Re: assign to magic name-of-function variable instead of "return"

2001-02-10 Thread Johan Vromans
Damian Conway <[EMAIL PROTECTED]> writes: > sub { > ... > return $yadda_yadda; > } > always { close F } Let's try not to fall into the Java trap. If exception handling gets too wordy, programmers will try to reduce the overhead by combining many stat

Re: assign to magic name-of-function variable instead of "return"

2001-02-07 Thread Johan Vromans
Bart Lateur <[EMAIL PROTECTED]> writes: > The place where it would be put, would be irrelevant. > > sub readit { > POST { > close F; > } > open F, "< $f" ... > scalar() > } Would the POST be executed if the open fails? Wh

Re: assign to magic name-of-function variable instead of "return"

2001-02-04 Thread Johan Vromans
James Mastros <[EMAIL PROTECTED]> writes: > On Thu, Feb 01, 2001 at 07:36:59PM -0600, David L. Nicol wrote: > And I always hated that about VB and Pascal -- you can assign to the magic > variable, but can't modify it. That was before the invention of auto-assignment operators. In the 70s, Burrou

Re: Really auto autoloaded modules

2001-02-01 Thread Johan Vromans
Dan Sugalski <[EMAIL PROTECTED]> writes: > The module loaded can define the routines as either regular perl > subs or opcode functions (the difference is in calling convention > mainly) [...] Difference in calling convention at the user level or just internal? -- Johan

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

2000-10-02 Thread Johan Vromans
"Peter Buckingham" <[EMAIL PROTECTED]> writes: > ... but it may be simpler than just doing everything from > scratch in xfig. Check Tgif (http://bourbon.cs.umd.edu:8001/tgif/). -- Johan

Re: RFC 335 (v1) Class Methods Introspection: what methods does this object support?

2000-10-02 Thread Johan Vromans
[Quoting Piers Cawley, on October 2 2000, 09:44, in "Re: RFC 335 (v1) Cla"] > > $class->can(qr/./); > > That wasn't the similar thing I meant. I was talking about walking the > @ISA tree. But having C work like that too would be neat. Exactly. 'can' walks the ISA tree searching for a name and

Re: RFC 357 (v1) Perl should use XML for documentation instead of POD

2000-10-02 Thread Johan Vromans
Jonathan Scott Duff <[EMAIL PROTECTED]> writes: > I'll just add my voice to the others. POD is more readable than XML. Don't forget: more _writable_ as well. -- Johan

Re: RFC 335 (v1) Class Methods Introspection: what methods does this object support?

2000-09-29 Thread Johan Vromans
Piers Cawley <[EMAIL PROTECTED]> writes: > Actually, I'd like to see something similar done to Universal::can my @methods = $class->can(pattern) where pattern is a perl pattern matching method names. For a full list, use $class->can(); or $class->can(qr/./); -- Johan

Re: RFC 292 (v1) Extensions to the perl debugger

2000-09-27 Thread Johan Vromans
[Quoting Dave Storrs, on September 26 2000, 11:47, in "Re: RFC 292 (v1) Ext"] > I'm confused...are you suggesting that the debugger should no > longer be integrated into perl? Absolutely not! What I wanted to indicate is that the input and output handling of the debugger, currently line in

Re: RFC 212 (v1) Make length(@array) work

2000-09-19 Thread Johan Vromans
Nathan Torkington <[EMAIL PROTECTED]> writes: > Randal L. Schwartz writes: > > This proposal makes length() an un-prototypable (and therefore > > unoverridable). Do you have a proposal for how to handle that? > > Do we really want everything in Perl to be overridable? RFC 168. -- Johan

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-17 Thread Johan Vromans
Tom Christiansen <[EMAIL PROTECTED]> writes: > keys %HASH = LIST; > > is really > > @HASH{ LIST } = (); Hmm, is it? I'd expect the first form to set the keys, meaning that the hash will have _only_ the indicated keys. The second form will only add the keys, making sure they exist, and

Re: RFC 132 (v3) Subroutines should be able to return an lvalue

2000-09-01 Thread Johan Vromans
[Quoting Nathan Wiger, on August 31 2000, 14:40, in "Re: RFC 132 (v3) Sub"] > > sub param { > > my ($self, @rest) = @_; > > $self->{aval} = @rest if @rest; # See note > > lreturn $self->{aval}; > > } > > I've been thinking about this for a couple days. The only problem I see >

Re: RFC 181 (v1) Formats out of core / New format syntax

2000-08-31 Thread Johan Vromans
Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: > Formats out of core / New format syntax Good work! This RFC opens the possibility to normalize (e.g. make the syntax no longer something exceptional) the formats. >my format $FILE_FORMAT = q( > @<: @ > $name, $ssn > );

Re: partial assignment using lvalue?

2000-08-30 Thread Johan Vromans
Kenneth Lee <[EMAIL PROTECTED]> writes: > it seems all the "lvalue sub" RFCs haven't mentioned this. > currently we can do > > $str = "foo bar"; > substr($str, 4, 0) = "baz "; > > and $str will become "foo baz bar". should we be able to do > this with lvalue-subs? how can one returns "poin

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

2000-08-30 Thread Johan Vromans
John McNamara <[EMAIL PROTECTED]> writes: > As far as I can see the current consensus is as follows: > 1. Implicit variable: nice but not really worth the trouble. > 2. Explicit variable between foreach and the array: might conflict > with other proposals. > 3. Explicit cou

Re: RFC 168 (v1) Built-in functions should be functions

2000-08-30 Thread Johan Vromans
nt, printf, prototype, push, q, qq, qw, qx, redo, > return, s, scalar, shift, sort, splice, split, study, sub, tie, > tied, tr, undef, unless, unshift, untie, until, use, while, and y. Johan Vromans added: > Hmm. Quite a few of these should no longer be special: > > chop, defin

Re: RFC 132 (v3) Subroutines should be able to return an lvalue

2000-08-30 Thread Johan Vromans
Nathan Wiger <[EMAIL PROTECTED]> writes: >$cgi->param($var) = @val; >$cgi->param($var, @val); You can do that easily: sub param { my ($self, @rest) = @_; $self->{aval} = @rest if @rest; # See note lreturn $self->{aval}; } Note that no assignment in line "# See note"

Re: RFC 168 (v1) Built-in functions should be functions

2000-08-30 Thread Johan Vromans
Peter Scott <[EMAIL PROTECTED]> writes: > I think you can't just leave it at that; the implication of this > requirement is that there should be a prototype for print's optional > filehandle. I count on Larry's promise to do something about the indirect object stuff. -- Johan

Re: RFC 155 - Remove geometric functions from core

2000-08-28 Thread Johan Vromans
Nick Ing-Simmons <[EMAIL PROTECTED]> writes: > But if perl6 bytecode does not need to be modified to be used I'd assume that. -- Johan

Re: RFC 155 - Remove geometric functions from core

2000-08-25 Thread Johan Vromans
Tom Christiansen <[EMAIL PROTECTED]> writes: > Keywords that *cannot* be overridden are chop, defined, delete, do, > dump, each , else, elsif, eval, exists, for, foreach, format, glob, > goto, grep, if, keys, last, local, m, map, my, next, no, package, > pop, pos, print, printf, prototype, push,

Re: RFC 135 (v2) Require explicit m on matches, even with ?? and // as delimiters.

2000-08-25 Thread Johan Vromans
Nathan Torkington <[EMAIL PROTECTED]> writes: > Read my lips: GOOD THING. Do we have an RFC yet that proposes Perl to be easier parsable? Damian? -- Johan

Re: why not just use C /* ... */ ?

2000-08-23 Thread Johan Vromans
iain truskett <[EMAIL PROTECTED]> writes: > > With SLC, discarding a line if it starts with a # (after optional > > whitespace) is straightforward, fail safe, and fast. > > Almost. You can have # in other places on the line. It doesn't have to > be at the start (with or without whitespace). I w

Re: why not just use C /* ... */ ?

2000-08-23 Thread Johan Vromans
[Quoting Michael Mathews, on August 23 2000, 11:45, in "Re: why not just use"] > Really, why? I have yet to hear any C or Java programmers complain > about the fact that you cannot nest /*...*/ comments. In their official (published!) coding standards, Sun explicitly states that one should use th

Re: why not just use C /* ... */ ?

2000-08-23 Thread Johan Vromans
iain truskett <[EMAIL PROTECTED]> writes: > It's not *that* slow. Just means the parser is looking for /* as well as > */ ... And "/*" and ""/*" and '/*' and qw(*/) and #*/ and \#*/ and m/.*/ ... With MLC, you need to _parse_ the comments. What happens if you find a unterminated quoted string i

Re: why not just use C /* ... */ ?

2000-08-23 Thread Johan Vromans
"Michael Mathews" <[EMAIL PROTECTED]> writes: > Nesting is a problem you don't really want to solve, in my opinion. The > world gets real weird, real fast when you can nest and/or overlap comments. > Not worth the trouble. If the prime argument for mlc is commenting out large blocks of code then

Re: RFC 132 (v1) subroutines should be able to return an lvalue

2000-08-22 Thread Johan Vromans
[Quoting David L. Nicol, on August 21 2000, 23:06, in "Re: RFC 132 (v1) sub"] > Looks like a case for automatic dereferencing! Which Perl has always stated it would _never_ do. Well, this could be the time of changes. -- Johan

Re: RFC 132 (v1) subroutines should be able to return an lvalue

2000-08-20 Thread Johan Vromans
Chaim Frenkel <[EMAIL PROTECTED]> writes: > JV> An attribute would > > JV> - require the sub to be consequent in what it returns; > > I can't parse that line. With an lvalue atttribute, a sub is assumed to always return an lvalue. The lreturn proposal makes it possible for a sub to determin

Re: RFC 132 (v1) subroutines should be able to return an lvalue

2000-08-20 Thread Johan Vromans
[Quoting Chaim Frenkel, on August 20 2000, 00:54, in "Re: RFC 132 (v1) sub"] > Why do you mind having an attribute? An attribute would - require the sub to be consequent in what it returns; - require the sub to be predeclared before it can be used; - make it unfeasable for methods. -- Joh

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

2000-08-19 Thread Johan Vromans
Mike Pastore <[EMAIL PROTECTED]> writes: > I like the proposed syntax! I also think that C would be > useful, ... Seconded. It nicely fits in the current way each() is used and no backward incompatibilties. Especially when iterating sparse arrays. while (($index,$value) = each(@sparse_array))

Re: RFC 132 (v1) subroutines should be able to return an lvalue

2000-08-18 Thread Johan Vromans
Damian Conway <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (Randal L. Schwartz) writes: > > > So is that something we've agreed, that lvalue subs are *always* > > scalars? That'd mean we can move on to the various implementation > > details. :) > > Err, I for one would like to see *any* dat

Re: RFC 132 (v1) subroutines should be able to return an lvalue

2000-08-18 Thread Johan Vromans
Nathan Torkington <[EMAIL PROTECTED]> writes: > ... the PDL folks who were the drivers for the current lvalue sub > implementation ... I assume they are on this list, then. -- Johan

Re: RFC 132 (v1) subroutines should be able to return an lvalue

2000-08-18 Thread Johan Vromans
[EMAIL PROTECTED] (Randal L. Schwartz) writes: > So is that something we've agreed, that lvalue subs are *always* > scalars? That'd mean we can move on to the various implementation > details. :) I think scalars play a super-normal role already. E.g., hashes and arrays can hold only scalar valu

Re: RFC 132 (v1) subroutines should be able to return an lvalue

2000-08-18 Thread Johan Vromans
[EMAIL PROTECTED] (Randal L. Schwartz) writes: > How do you indicate to the compiler at the time of compiling: > > lvsub() = FOO > > that FOO should be evaluated in list context? Or scalar context? In all cases but one the context is scalar anyway. The only case when the context could

Re: RFC 132: subroutines should be able to return an lvalue

2000-08-18 Thread Johan Vromans
"Syloke Soong" <[EMAIL PROTECTED]> writes: > func(args) = ... > func(args) += ... > func(args) =~ s/// > > Such functions have been modeled in object models that accept > arg-list+operator (head+operator) polymorphic signatures. It would be > up to the programmer of func() to dictate

Re: RFC 132 (v1) subroutines should be able to return an lvalue

2000-08-18 Thread Johan Vromans
Jonathan Scott Duff <[EMAIL PROTECTED]> writes: > But why introduce a new keyword "lreturn"? What about something like > this? > > sub foo { > my $lvalue : lvalue; > ... > return $lvalue if want('LVALUE'); > } Because you cannot do this with my %has

Re: Subroutines: Extend subroutine contexts to include name parameters and lazy arguments

2000-08-18 Thread Johan Vromans
> If the C modifier is used for a particular parameter, that parameter > is lazily evaluated. This means that it is only evaluated when the > corresponding named parameter (see below) -- or the corresponding element > of @_ -- is accessed in some way. Passing the parameter to another > subroutine

Re: implied pascal-like "with" or "express"

2000-08-18 Thread Johan Vromans
Damian Conway <[EMAIL PROTECTED]> writes: > Okay, what if C simply aliased its hash argument to a > localized %_ (remember that one?): > > with (%ws) { > print $_{height}; # prints $ws{height} > print $height; # perl5 visibility rules >

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

2000-08-17 Thread Johan Vromans
Buddha Buck <[EMAIL PROTECTED]> writes: > > $cgi->param($var) += ... > > This is not a pure lvalue, but rather both an lvalue and an rvalue, > equivalent to: > > $cgi->param($var) = $cgi->param($var) + ... > > It should evaluate $cgi->param($var) twice, once as an rvalue, and > once

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

2000-08-17 Thread Johan Vromans
Damian Conway <[EMAIL PROTECTED]> writes: > 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, because it allows every other type > of modification to work too. Exactly! -- Johan

Re: Ideas that need RFCs?

2000-08-17 Thread Johan Vromans
"Stephen P. Potter" <[EMAIL PROTECTED]> writes: > * Socket functions (such as C, C, etc) should be moved from > the core to modules/libraries. > * Math functions (such as C, C, C, etc) should be moved > from the core to modules/libraries. > * IPC functions (such as C, C, C, etc) should be >

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

2000-08-17 Thread Johan Vromans
John Porter <[EMAIL PROTECTED]> writes: > 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. Yes, you can. For an approach like this, the hash needs to be a pseudo-hash anyway. -- Joha

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

2000-08-17 Thread Johan Vromans
[Quoting Graham Barr, on August 17 2000, 18:32, in "Re: RFC 118 (v1) lva"] > if $b happens to be tied and FETCH returns a different value to what Yes, tie is along the same lines. -- Johan

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

2000-08-17 Thread Johan Vromans
Nathan Wiger <[EMAIL PROTECTED]> writes: > Most of the places I've seen them used really well is if > they walk and talk like other forms: > >$cgi->param($var, @val); # traditional >$cgi->param($var) = @val; # lvalue, but same thing I do not think this is critical. When lvalue

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

2000-08-17 Thread Johan Vromans
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)? -- Johan

Re: RFC 104 (v1) Backtracking

2000-08-16 Thread Johan Vromans
Damian Conway <[EMAIL PROTECTED]> writes: >> As I understand things: >> >> BLOCK1 andthen BLOCK2 >> >> evaluates BLOCK1 and then if BLOCK1 evaluates to "true" evaluates >> BLOCK2. If BLOCK2 evaluates to "true" we're done. If BLOCK2 >> evaluates to "false", then BL

Re: Internal Filename Representations (was Re: Summary of I/O related RFCs)

2000-08-12 Thread Johan Vromans
Nathan Wiger <[EMAIL PROTECTED]> writes: >$fo = open "C:\Windows\System\IOSUBSYS\RMM.PDR"; >$fo->pathdrive = "C:" ; I think the drive is "C", not "C:". >$fo->patharray = [ Windows, System, IOSUBSYS, RMM.PDR ]; I think the patharray is [ Windows, System, IOSUBSYS ]. The file name is