Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Michael G Schwern
On Wed, Sep 13, 2000 at 11:34:20PM -0700, Glenn Linderman wrote: > The rest is handled adequately and consistently today, and Tom's > dequote is adequate to eliminate leading white space... especially > among people who cannot agree that a tab in a file means "mod 8" > (which it does). Damnit, I'

Re: RFC 215 (v2) More defaulting to $_

2000-09-14 Thread Philip Newton
On 13 Sep 2000, Perl6 RFC Librarian wrote: > An inconsistency between "C" and "<>" bugs me: "C" means > "C" so it seems like "<>" should mean "C<$_ = > <>". > This would break code prompting for "Press any key" and wasting the > input. I suggest again: s/"<>"/"C<< <> >>"/g; s/C<$_ = > <>/C<< $

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Ariel Scolnicov
Michael G Schwern <[EMAIL PROTECTED]> writes: [...] > I propose that this work out to > > "The old lie\n Dulce et decorum est\n Pro patria mori.\n" > > and always work out to that, no matter how far left or right the > expression be indented. > >{ { { { { > if(

Re: RFC 215 (v2) More defaulting to $_

2000-09-14 Thread Philip Newton
On 13 Sep 2000, Perl6 RFC Librarian wrote: > =head1 DESCRIPTION > > $_ is the default scalar for a small set of operations and functions. > Most of these operations and functions are ones that use C<=~>. Er, no. Quite a few others also use $_. The ones I found: -X filehandle tests (except for -

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Michael G Schwern
I've implemented a prototype of the indented here-doc tag I'm proposing. http://www.pobox.com/~schwern/src/RFC-Prototype-0.02.tar.gz Its RFC::Prototype::111, which is probably the wrong number. I'll have to add < be expanded. 2. POD end tags may now be followed by trailing whitespace --

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Richard Proctor
Michael, I just noticed your post (I am at work). This is begining to get there (maybe I should not have split the original 111). In the prototype you only cover use of " quotes. if( ($pre_code, $quote_type, $curr_tag, $post_code) = $_ =~ m/(.*)\<\<(")(\w+)"(.*)/ ) It needs to match (.*)<<(

Can we improve the missing paren error message?

2000-09-14 Thread Ed Mills
use diagnostics; my $i=1; print 'hi' if ($i=1; running this with perl -wc (v 5.004, unix), I get perl -wc x.pl syntax error at x.pl line 3, near "1;" x.pl had compilation errors (#1) (F) The final summary message when a perl -c fails. Uncaught exception from user code:

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Eric Roode
Glenn Linderman wrote: >Amen to the below. So can we have an RFC 111 (v4) that gets rid of allowing >stuff after the terminator? Even the ";" afterward seems useless... the ";" >should be at the end of the statement, not the end of the here doc. The only >improvement to here docs I see in this

Re: Can we improve the missing paren error message?

2000-09-14 Thread Bart Lateur
On Thu, 14 Sep 2000 12:16:51 GMT, Ed Mills wrote: >If I'm missing a "}" the compiler tells me its missing. That's also a syntax >error, but it reports the actual missing "}". Why not do the same for ")"? That reminds me: if Perl reports a missing "}", "]" or ")", it would also be very nice if

Re: RFC 217 (v2) POD needs a reorder command.

2000-09-14 Thread John Porter
> Sometimes I want a chunk of documentation to hang out near a > chunk of code, but the order of the code is not always a good order for > a man page. Are you familiar with the C m4 command? L. I'm not saying it would be the way to go; but it might be useful to see how another preprocessing lan

Re: RFC 213 (v1) rindex and index should return undef on failure

2000-09-14 Thread John Porter
Chaim Frenkel wrote: > > Removing -1 as a valid result, could be a breakage (if someone is > doing something weird with a negative result) What, like using it as an index into a substr? Bad Code is its own reward, my friend. > $foo = "flabergasted"; > substr($foo, index($foo, 'abc'

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Eric Roode
Ariel Scolnicov wrote: >1. It requires the perl parser know about indentation. Of course we > all know that tabs are 8 characters wide (I myself make a point of > bludgeoning anyone who says otherwise), but do we really want to > open this can of worms? Not so fast with those 8-column tabs

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Richard Proctor
In Michael Schwerns prototype, expansion to treat both semicolons and comments at the end tag is possible by changing /^(\s*)$curr_tag\s*$/ to /^(\s*)$curr_tag\s*(;\s*)?(#.*)?$/ Richard

Re: $a in @b (RFC 199)

2000-09-14 Thread 'John Porter'
David L. Nicol wrote: > "Randal L. Schwartz" wrote: > > > > I think we need a distinction between "looping" blocks and > > "non-looping" blocks. And further, it still makes sense to > > distinguish "blocks that return values" (like subroutines and map/grep > > blocks) from either of those. But

Re: $a in @b (RFC 199)

2000-09-14 Thread Jarkko Hietaniemi
> David L. Nicol wrote: > > "Randal L. Schwartz" wrote: > > > > > > I think we need a distinction between "looping" blocks and > > > "non-looping" blocks. And further, it still makes sense to > > > distinguish "blocks that return values" (like subroutines and map/grep > > > blocks) from either o

RE: (RFC 199) Alternative Early-Exit Mechanisms for Blocks?

2000-09-14 Thread Garrett Goebel
David L. Nicol wrote: > "Randal L. Schwartz" wrote: > > > > I think we need a distinction between "looping" blocks and > > "non-looping" blocks. And further, it still makes sense to > > distinguish "blocks that return values" (like subroutines > > and map/grep blocks) from either of those. But

RE: (RFC 199) Alternative Early-Exit Mechanisms for Blocks?

2000-09-14 Thread Eric Roode
Garrett Goebel wrote: >Could someone shoot down or prop up the following: > >* Subroutines automatically get their name as a label Ick! Shades of Pascal! Why don't we just replace "return $value" with "subroutine_name = $value;"! Seriously, what is the point of sub func1 { func

Re: $a in @b (RFC 199)

2000-09-14 Thread 'John Porter'
Jarkko Hietaniemi wrote: > > In the other camp, C has been suggested; but > > the conflation of that with its thread-related semantics may not > > be a such good idea. > > C. Well, "pass" might be o.k.; but it usually means something going *into* a sub, not coming out... -- John Porter

Re: (RFC 199) Alternative Early-Exit Mechanisms for Blocks?

2000-09-14 Thread John Porter
Eric Roode wrote: > > sub func1 > { > func2(); > } > > sub func2 > { > last func1; > } > > ? Imho, it is a BAD THING for functions to know who called them, > and to vary their behavior accordingly. Yes. This is a serious downside to the propos

Re: $a in @b (RFC 199)

2000-09-14 Thread Jarkko Hietaniemi
On Thu, Sep 14, 2000 at 11:46:31AM -0400, 'John Porter' wrote: > Jarkko Hietaniemi wrote: > > > In the other camp, C has been suggested; but > > > the conflation of that with its thread-related semantics may not > > > be a such good idea. > > > > C. > > Well, "pass" might be o.k.; but it usually

Re: (RFC 199) Alternative Early-Exit Mechanisms for Blocks?

2000-09-14 Thread 'John Porter'
Garrett Goebel wrote: > > * Subroutines automatically get their name as a label My concern here is whether it introduces a problem with C vs. C. If, as you propose, subs do get their name as label, I would like to conflate these two forms. But the semantics of C specifies that @_ is passed as

Re: RFC 208 (v2) crypt() default salt

2000-09-14 Thread Mark-Jason Dominus
> =head1 TITLE > > crypt() default salt > > =head1 VERSION > > Maintainer: Mark Dominus <[EMAIL PROTECTED]> > Date: 11 Sep 2000 > Last Modified: 13 Sep 2000 > Mailing List: [EMAIL PROTECTED] > Number: 208 > Version: 2 > Status: Developing If there are no objections, I will freez

RE: (RFC 199) Alternative Early-Exit Mechanisms for Blocks?

2000-09-14 Thread Garrett Goebel
From: John Porter [mailto:[EMAIL PROTECTED]] > Eric Roode wrote: > > > > sub func1 > > { > > func2(); > > } > > > > sub func2 > > { > > last func1; > > } > > > > ? Imho, it is a BAD THING for functions to know who called them, > > and to vary the

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and HereDocs)

2000-09-14 Thread Dave Storrs
On 14 Sep 2000, Ariel Scolnicov wrote: > 1. It requires the perl parser know about indentation. Of course we >all know that tabs are 8 characters wide (I myself make a point of >bludgeoning anyone who says otherwise), but do we really want to >open this can of worms? No, b

Drop here docs altogether? (was Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs))

2000-09-14 Thread Nathan Wiger
> Show me where this fails and I'll shut up about it. Actually, to me this thread underscores how broken here docs are themselves. We already have q//, qq//, and qx// which duplicate their functions far more flexibly. Question: Do we really need here docs? Before you scream "Bloody murder", pleas

Re: Drop here docs altogether? (was Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs))

2000-09-14 Thread Peter Scott
At 10:52 AM 9/14/00 -0700, Nathan Wiger wrote: >Actually, to me this thread underscores how broken here docs are >themselves. We already have q//, qq//, and qx// which duplicate their >functions far more flexibly. Question: Do we really need here docs? I have thought this before, but I think the

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Richard Proctor
This whole debate has got silly. RFC 111 V1 covered both the whitespace on the terminator and the indenting - there was a lot of debate that this was two things - more were in favour of the terminator and there was more debate on the indenting. Therefore I split this into two RFCs leaving RFC111

Re: Drop here docs altogether? (was Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs))

2000-09-14 Thread Eric Roode
Nathan Wiger wrote: >Actually, to me this thread underscores how broken here docs are >themselves. We already have q//, qq//, and qx// which duplicate their >functions far more flexibly. Question: Do we really need here docs? Yes. Try generating lots of HTML, Javascript, Postscript, or other lan

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Eric Roode
Richard Proctor made some excellent comments, and asked: >When measuring whitespace how does the system treat tabs? (be realistic >and dont FLAME) I suggest that there be NO tab/space conversion. Not 8 columns, not 4 columns, nothing. If the here doc terminator has four tabs preceding it, then f

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Nathan Wiger
Eric Roode wrote: > > I suggest that there be NO tab/space conversion. I also suggest that no whitespace stripping/appending/etc/etc be done at all. If I write: if ( $its_all_good ) { print <

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Eric Roode
Nathan Wiger wrote: > >I also suggest that no whitespace stripping/appending/etc/etc be done at >all. If I write: [...deletia...] >But this shouldn't be implicit in the language. That's a good argument for having a separate operator for these "enhanced here docs", say <<<, rather than chucking th

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Glenn Linderman
Michael G Schwern wrote: > On Wed, Sep 13, 2000 at 11:34:20PM -0700, Glenn Linderman wrote: > > The rest is handled adequately and consistently today, and Tom's > > dequote is adequate to eliminate leading white space... especially > > among people who cannot agree that a tab in a file means "mod

Re: RFC 208 (v2) crypt() default salt

2000-09-14 Thread Bart Lateur
On Thu, 14 Sep 2000 11:58:46 -0400, Mark-Jason Dominus wrote: >If there are no objections, I will freeze this in twenty-four hours. Oh, I have a small one: I feel that this speudo-random salt should NOT affect the standard random generator. I'll clarify: by default, if you feed the pseudo-random

Re: Drop here docs altogether? (was Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs))

2000-09-14 Thread Bart Lateur
On Thu, 14 Sep 2000 10:52:16 -0700, Nathan Wiger wrote: >We already have q//, qq//, and qx// which duplicate their >functions far more flexibly. Question: Do we really need here docs? With your above functions, you always need to be able to escape the string end delimiter. Therefore, you will al

RFC 111

2000-09-14 Thread Richard Proctor
This whole debate has got silly. RFC 111 V1 covered both the whitespace on the terminator and the indenting - there was a lot of debate that this was two things - more were in favour of the terminator and there was more debate on the indenting. Therefore I split this into two RFCs leaving RFC111

Re: Conversion of undef() to string user overridable for easy debugging

2000-09-14 Thread Steve Fink
> > This reminds me of a related but rather opposite desire I have had > > more than once: a quotish context that would be otherwise like q() but > > with some minimal extra typing I could mark a scalar or an array to be > > expanded as in qq(). > > I have wanted that also, although I don't remem

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Michael G Schwern
On Thu, Sep 14, 2000 at 11:49:18AM -0700, Glenn Linderman wrote: > I'm all for solving problems, and this message attempts to specify 3 > problems, but it needs more specification. You describe three > problems, but it is not clear what the problems are Since we've been charging back and forth o

Re: RFC 213 (v1) rindex and index should return undef on failure

2000-09-14 Thread Glenn Linderman
John Porter wrote: > Chaim Frenkel wrote: > > > > Removing -1 as a valid result, could be a breakage (if someone is > > doing something weird with a negative result) > > What, like using it as an index into a substr? > Bad Code is its own reward, my friend. > > > $foo = "flabergasted"; > >

Re: Drop here docs altogether? (was Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs))

2000-09-14 Thread Glenn Linderman
Nathan Wiger wrote: > Solves problem #1, indented terminator, except that it adds two newlines > (more later). I never found anything later about these extra newlines... so if this idea has merit, it needs to be finished. > However, it leaves 2 and 3. Let's try adding in a regexp: > >if( $i

RFC 223 (v1) Objects: C pragma

2000-09-14 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Objects: C pragma =head1 VERSION Maintainer: Damian Conway <[EMAIL PROTECTED]> Date: 14 September 2000 Mailing List: [EMAIL PROTECTED] Number: 223 Version: 1 Status: Developing =head1 ABSTRACT

Re: Drop here docs altogether? (was Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs))

2000-09-14 Thread Michael G Schwern
On Thu, Sep 14, 2000 at 10:52:16AM -0700, Nathan Wiger wrote: > Before you scream "Bloody murder", please read on... I'll wait patiently for the end... >if( $is_fitting && $is_just ) { > die subst /\s{8}(.*?\n)/$1/g, qq/ > The old lie >Dulce et decorum est

Re: Drop here docs altogether? (was Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs))

2000-09-14 Thread Glenn Linderman
Glenn Linderman wrote: > I think $mesg wins up with the value of "1" the way you've coded it. Sorry, I missed the placement of the (). $mesg is fine. -- Glenn = There are two kinds of people, those who finish what they start, and so on... -- Robert Byrne __

Re: Drop here docs altogether? (was Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs))

2000-09-14 Thread Nathan Wiger
Michael G Schwern wrote: > > No, it still has all the problems of any other regex-based solution. > If you shift the code right or left, it breaks (due to the \s{8}) and > you're back to counting whitespace again. Y'know, I pointed out before why I think this is a superfluous issue. You have to

Re: RFC 223 (v1) Objects: C pragma

2000-09-14 Thread John Porter
> This RFC proposes that, as in Perl 5, the invocant of a method should be > normally available to the method as $_[0], but that it can be > automaticaly stripped from @_ and accessed via either a subroutine > or a variable, using the C pragma. Uh, that should "invocand", should it not? In

Re: RFC 223 (v1) Objects: C pragma

2000-09-14 Thread Damian Conway
> Uh, that should "invocand", should it not? No. > Unless the OO community has already decided this issue unbeknownst to me... As of Camel III "invocant" is the way to refer to the reference to an object through which a method is called. I.e. the reference that inevitably ends up in $s

Re: RFC 223 (v1) Objects: C pragma

2000-09-14 Thread Nathan Wiger
> Mailing List: [EMAIL PROTECTED] Just to nitpick, this should probably be perl6-language-objects > sub method ($self, @args) { > ... > } > > and this may, indeed, be sufficient. Remember, this still won't solve the problem of a module whose functions can hand

RFCs up for adoption, and a proto-RFC

2000-09-14 Thread James Mastros
Hey all. Unfornatly, I don't have as much time for perl6 hacking as I'd like -- real life is rather getting in the way. Therefore, the following RFCs are up for adoption: 149 (v1): Lvalue subroutines: implicit and explicit assignment -- This is a comprimize RFC between the two lvalue subrotin

Re: RFCs up for adoption, and a proto-RFC

2000-09-14 Thread Nathan Wiger
James Mastros wrote: > > RFC 163: Automatic accessors for hash-based objects -- This is the good one > of mine . I would really like to see somthing like this in perl6. Get > rid of the byzanthine access specifiers, and just get a :laccess, :raccess, > and :access method. Look at the archives

Re: Drop here docs altogether? (was Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs))

2000-09-14 Thread Michael G Schwern
On Thu, Sep 14, 2000 at 01:30:15PM -0700, Nathan Wiger wrote: > Y'know, I pointed out before why I think this is a superfluous issue. > You have to either change your regexp, or change the indentation of your > here docs terminator when you move your code around. I think it would be best for us

Re: RFCs up for adoption, and a proto-RFC

2000-09-14 Thread James Mastros
From: "Nathan Wiger" <[EMAIL PROTECTED]> To: "James Mastros" <[EMAIL PROTECTED]> Sent: Thursday, September 14, 2000 5:32 PM Subject: Re: RFCs up for adoption, and a proto-RFC > James Mastros wrote: > > RFC 163: Automatic accessors for hash-based objects > I'll gladly grab this from you. I think

Re: RFC 213 (v1) rindex and index should return undef on failure

2000-09-14 Thread Chaim Frenkel
> "NT" == Nathan Torkington <[EMAIL PROTECTED]> writes: NT> Chaim Frenkel writes: >> Somehow I find >> if (40 == ($foo = substr($bar, index($bar, 'xyz' { >> } NT> I don't understand your hypothetical code. substr() returns the NT> substring of $bar from the position retutned by index, o

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Glenn Linderman
Michael G Schwern wrote: > On Thu, Sep 14, 2000 at 11:49:18AM -0700, Glenn Linderman wrote: > > I'm all for solving problems, and this message attempts to specify 3 > > problems, but it needs more specification. You describe three > > problems, but it is not clear what the problems are > > Since

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Michael G Schwern
On Thu, Sep 14, 2000 at 02:51:14PM -0700, Glenn Linderman wrote: > Michael G Schwern wrote: > Well, OK, so now we're talking shades of opinion. You'd agree it > works, though, and quite effectively. But you'd disagree about its > aesthetics, and its performance. The former is much less > intere

Re: RFC 226 (v1) Selective interpolation in single quotish context.

2000-09-14 Thread Mark-Jason Dominus
> seconded by Mark-Jason Dominus <[EMAIL PROTECTED]> Except that I don't think adding this feature to the existing q{...} is a good idea. If I had to vote on your proposal, I would instantaly vote against it. I think you should have invented a new operator or a pragma or something.

Re: RFC 226 (v1) Selective interpolation in single quotish context.

2000-09-14 Thread Michael G Schwern
I have misgivings. I like single-quote context *because* you don't have to worry about anything magical (except ' and \). On Thu, Sep 14, 2000 at 09:52:12PM -, Perl6 RFC Librarian wrote: > print F < \$! > \$! execute a.com, copy and purge > \$! > \$ \@sys\$log

Re: RFC 226 (v1) Selective interpolation in single quotish context.

2000-09-14 Thread Jarkko Hietaniemi
On Thu, Sep 14, 2000 at 06:04:41PM -0400, Mark-Jason Dominus wrote: > > > seconded by Mark-Jason Dominus <[EMAIL PROTECTED]> > > Except that I don't think adding this feature to the existing q{...} > is a good idea. If I had to vote on your proposal, I would instantaly > vote against it. I thi

'eval' odd thought

2000-09-14 Thread Mark-Jason Dominus
The perl 5 -> perl 6 translator should replace calls to 'eval' with calls to 'perl5_eval', which will recursively call the 5->6 translator to translate the eval'ed string into perl 6, and will then eval the result. Mark-Jason Dominus [EMAIL PROTECTED

Re: RFC 226 (v1) Selective interpolation in single quotish context.

2000-09-14 Thread Jarkko Hietaniemi
On Thu, Sep 14, 2000 at 05:11:39PM -0500, Jarkko Hietaniemi wrote: > On Thu, Sep 14, 2000 at 06:04:41PM -0400, Mark-Jason Dominus wrote: > > > > > seconded by Mark-Jason Dominus <[EMAIL PROTECTED]> > > > > Except that I don't think adding this feature to the existing q{...} > > is a good idea.

Re: RFC 226 (v1) Selective interpolation in single quotish context.

2000-09-14 Thread Mark-Jason Dominus
> > One could for example have a pragma to *really* tag variables > > lexically to be expanded within singlequotes. Or a pragma that simply changes the semantics of q{...} so that it has the proposed feature for the rest of the scope of the current block.

Re: RFC 226 (v1) Selective interpolation in single quotish context.

2000-09-14 Thread Jarkko Hietaniemi
On Thu, Sep 14, 2000 at 06:17:07PM -0400, Mark-Jason Dominus wrote: > > > > One could for example have a pragma to *really* tag variables > > > lexically to be expanded within singlequotes. > > Or a pragma that simply changes the semantics of q{...} so that it has > the proposed feature for th

Re: RFC 226 (v1) Selective interpolation in single quotish context.

2000-09-14 Thread Brad Hughes
Michael G Schwern wrote: [...] > Personally, I'd solve this with sprintf(): > > print F sprintf <<'END', $filename; > $! > $! execute a.com, copy and purge > $! > $ @sys$login:a.com > $ copy %s sys$login:*.* > $ purge sys$login:$filename > $! > $ exit > > but

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Nathan Wiger
Michael G Schwern wrote: > > > > I'd prefer if here-docs just DWIM. > > > Yes, but... what do you mean vs. what do others mean, and all these > > problems > > Others can continue to put the here-doc tag flush left if they don't > want this behavior. See, this is just too inflexible. The ma

Re: 'eval' odd thought

2000-09-14 Thread David L. Nicol
Mark-Jason Dominus wrote: > > The perl 5 -> perl 6 translator should replace calls to 'eval' with > calls to 'perl5_eval', which will recursively call the 5->6 translator > to translate the eval'ed string into perl 6, and will then eval the > result. And that gives us a convenient name space for

Re: RFC 226 (v1) Selective interpolation in single quotish context.

2000-09-14 Thread Damian Conway
Why not just give \I..\E a special "turn-on-interpolation" meaning in q{} docs? $code = ' $x = $y; @a = (1..10); $name = \I$funcname\E; # etc. '; Damian

Re: RFC 226 (v1) Selective interpolation in single quotish context.

2000-09-14 Thread Jarkko Hietaniemi
On Fri, Sep 15, 2000 at 10:29:31AM +1100, Damian Conway wrote: > Why not just give \I..\E a special "turn-on-interpolation" meaning in > q{} docs? > > $code = ' > > > $x = $y; > @a = (1..10); > $name = \I$funcname\E; That would be four keystrokes

Re: RFC 226 (v1) Selective interpolation in single quotish context.

2000-09-14 Thread Brad Hughes
Damian Conway wrote: > > Why not just give \I..\E a special "turn-on-interpolation" meaning in > q{} docs? > > $code = ' > > $x = $y; > @a = (1..10); > $name = \I$funcname\E; > > # etc. > > '; > > Damian Yes. M

Re: RFC 226 (v2) Selective interpolation in single quotish context.

2000-09-14 Thread Jerrad Pierce
What's wrong with extending current syntax such that: $a = "Hello"; print q(@{[$a]} World), "\n"; outputs Hello World instead of @{[$a]} World yes, it's a few extra char's but IMHO it's a logical extension it makes you think twice before doing it, do you really need to do thi

Re: RFC 226 (v2) Selective interpolation in single quotish context.

2000-09-14 Thread Jerrad Pierce
Oh yeah I forget to outline what it currently does for those whom may not have seen it... It's usally used for evaluation and interplation of code/subroutines in "", qq() and <>2||($_<<2>12)){$_="Vainyvq ragel";&{$F[0]};last;}&t;$0-=$_;$_="Lbh jva"; die(&{$F[0]}) if !($0-1);$0-=$0%2?$0>2?2:1:$0<=

Re: RFC 226 (v2) Selective interpolation in single quotish context.

2000-09-14 Thread Jarkko Hietaniemi
On Thu, Sep 14, 2000 at 10:01:23PM -0400, Jerrad Pierce wrote: > What's wrong with extending current syntax such that: Please read the discussion so far. -- $jhi++; # http://www.iki.fi/jhi/ # There is this special biologist word we use for 'stable'. # It is 'dead'. -- Jack Cohen

Re: RFC 226 (v2) Selective interpolation in single quotish context.

2000-09-14 Thread Jarkko Hietaniemi
Hang on... \I \E amounts to the same number of characters as using '. .' (that is, terminating this q-string, concat the thing, start a new q-string) So for scalars, there would be no savings at all. For arrays, yes, the proposed \I \E would still be useful. Maybe the \I should just scan for t

Re: RFC 226 (v2) Selective interpolation in single quotish context.

2000-09-14 Thread Damian Conway
> Hang on... \I \E amounts to the same number of characters as using > '. .' (that is, terminating this q-string, concat the thing, start > a new q-string) You can't do that in a <<'HERE' doc. > For arrays, yes, the proposed \I \E would still be useful. Maybe the > \I should

Re: RFC 226 (v2) Selective interpolation in single quotish context.

2000-09-14 Thread Jarkko Hietaniemi
On Fri, Sep 15, 2000 at 01:56:39PM +1100, Damian Conway wrote: >> Hang on... \I \E amounts to the same number of characters as using >> '. .' (that is, terminating this q-string, concat the thing, start >> a new q-string) > > You can't do that in a <<'HERE' doc. True. >> For

Re: RFC 226 (v2) Selective interpolation in single quotish context.

2000-09-14 Thread Damian Conway
> > No thanks. Suppose I want: > > > > '$x = $a; > > $y = func(\I$arg1, $arg2, $arg3\E); > > Hmmm...should \Ifunc($arg1)\E be replaced by the return value of > func($arg1)? I don't think so. I think \I..\E should just impose qq{..} semantics on the text in between. So yo

Re: RFC 226 (v2) Selective interpolation in single quotish context.

2000-09-14 Thread Uri Guttman
> "DC" == Damian Conway <[EMAIL PROTECTED]> writes: >> > No thanks. Suppose I want: >> > >> > '$x = $a; >> > $y = func(\I$arg1, $arg2, $arg3\E); >> >> Hmmm...should \Ifunc($arg1)\E be replaced by the return value of >> func($arg1)? DC> I don't think so. I think \I..\E sh

Re: RFC 226 (v2) Selective interpolation in single quotish context.

2000-09-14 Thread Damian Conway
> that makes good sense. so in a single quote string you can have domains > of double quote behavior. That's it exactly. Very well expressed, thanks Uri. > now, what if the double quoted range had a \E in it? either directly or > via interpolation? maybe the end escape should be ano

Re: RFC 226 (v1) Selective interpolation in single quotish context.

2000-09-14 Thread Nathan Torkington
Michael G Schwern writes: > I have misgivings. I like single-quote context *because* you don't > have to worry about anything magical (except ' and \). Genericise it. Alter the overloaded string constant behaviour of perl5 so that when you say: use MagicInterpolativeStrings; $foo = '$bar <

Re: RFC 226 (v2) Selective interpolation in single quotish context.

2000-09-14 Thread Glenn Linderman
I _like_ the conceptual idea, here. But I think we need a different kind of quoting, not extend single quote semantics. Single quote semantics are really, really, good for exact quoting. I'm sure you (since you mention VMS) find single quote semantics good for escaping all those $ VMS requires.

Re: RFC 226 (v2) Selective interpolation in single quotish context.

2000-09-14 Thread Glenn Linderman
Damian Conway wrote: >> now, what if the double quoted range had a \E in it? either directly or >> via interpolation? maybe the end escape should be another char than \E? > > Make \E significant only where it's explicit. None of the \ escapes are significant via interpolation, even today

RFC 102 (v2) Inline Comments for Perl.

2000-09-14 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Inline Comments for Perl. =head1 VERSION Maintainer: Glenn Linderman <[EMAIL PROTECTED]> Date: 14 Aug 2000 Last Modified: 14 Sep 2000 Mailing List: [EMAIL PROTECTED] Number: 102 Version: 2 Sta

RFC 229 (v1) Variable interpolation on demand.

2000-09-14 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Variable interpolation on demand. =head1 VERSION Maintainer: Glenn Linderman <[EMAIL PROTECTED]> Date: 14 Sep 2000 Mailing List: [EMAIL PROTECTED] Number: 229 Version: 1 Status: Developing =hea

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Ariel Scolnicov
Dave Storrs <[EMAIL PROTECTED]> writes: [...] > > print << FIRST_HERE_DOC; print << SECOND_HERE_DOC; > > This is on the left margin. > > This is indented one char. > > FIRST_HERE_DOC > > This is indented one char. > > This is on the left margin. > > SECOND_HERE_D

Re: $a in @b (RFC 199)

2000-09-14 Thread John Porter
David L. Nicol wrote: > > This ability to jump to "the right place" is exactly what exception handling > is for, as I understand it. Exceptions allow us to have one kind of block > and any number of kinds of exit mechanisms. If qC(last die return) are all > excpetions, the can travel up the call

Re: $a in @b (RFC 199)

2000-09-14 Thread David L. Nicol
'John Porter' wrote: > > David L. Nicol wrote: > > "Randal L. Schwartz" wrote: > > > > > > I think we need a distinction between "looping" blocks and > > > "non-looping" blocks. And further, it still makes sense to > > > distinguish "blocks that return values" (like subroutines and map/grep > >

RFC 226 (v1) Selective interpolation in single quotish context.

2000-09-14 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Selective interpolation in single quotish context. =head1 VERSION Maintainer: Brad Hughes <[EMAIL PROTECTED]> Date: Sep. 14, 2000 Mailing List: [EMAIL PROTECTED] Number: 226 Version: 1 Status: D

RFC 226 (v2) Selective interpolation in single quotish context.

2000-09-14 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Selective interpolation in single quotish context. =head1 VERSION Maintainer: Brad Hughes <[EMAIL PROTECTED]> Date: Sep. 14, 2000 Last Modified: Sep. 14, 2000 Mailing List: [EMAIL PROTECTED] Numbe