Re: RFC 100 (v2) Embed full URI support into Perl

2000-09-18 Thread Nathan Wiger

 I'd rather see you drop (or footnote) the discussion of how the various
 systems are going to map content among themselves, and focus more on
 what the construct allows.  For instance, returning to some of the
 original implementation ideas, that the location information be passed
 to the protocol handler, which will then DWIM, as determined by the
 platform, protocol, etc, etc.  Getting DOS and Unix to look at a
 portable construct.  Sure.  Needed, one way or another.  Getting them
 to Do The Right Thing based a single, uberportable input string just
 ain't gonna happen, so I'd address that either separately (with the
 file:// implementation) or not at all.

Something tells me you should have written this RFC. ;-)

Great points, I'll have to unfreeze this and redo it. Thanks.
 
 One of the big draws (to me) for URI support isn't even mentioned in
 the RFC, although it was discussed following v1, and that is adding
 DWIMmery to the open to support more than files and pipes.  (We
 recently added URI support to one of our projects for this reason.)

Check out RFC 14. At the bottom it talks all about this. However, I'm
going to add this into here as well because y'know, it's probably the
place it should really be.

-Nate



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

2000-09-18 Thread H . Merijn Brand

On Thu, 14 Sep 2000 12:41:04 -0700, Glenn Linderman [EMAIL PROTECTED] wrote:
 1) do perl6 formats need to have exactly the same scoping rules as perl5
 formats in this regard?

perl5 formats do NOT support lexicals, so this is not a very interesting
question. (Re-)implementation of formats in perl6 should only consider perl5
syntax in perl526 as conversion issues.

 2) is it a problem in practice?
 
 None of the format code I've written would work differently do to such a
 semantic change in the time of compilation, but I'm just one novice.  I
 tend to think that code that uses formats is really pretty simple code...

Bad thinking ;-) As an example, I've converted a 4GL/RPT script of over 1500
lines to a format using perl script of less than 150 lines being able of lots
and lots more. OK, it has since than grown to about 400 lines being able of
using headers, margings, footers and dynamic (nested) formats, but even than
is wasn't the most simplistic code.

 if it were more complex, it would probably use sprintf rather than
 format... as simple code, it tends not to have many scopes and reused
 variable names.

Using sprintf I could have reached the same results, but it would have been a
lot harder to document and maintain.

 If it is, p52p6 could handle this situation by renaming the inner scope's
 $foo to avoid the conflict.

Just look at Damian's proposal. Even the most heavily format using perl5
programmers (like me) will switch sooner or later. I'm looking at the
consequences of changing *ALL* my format scripts to using the format part of
Text::Autoformat right now.

-- 
H.Merijn Brand   Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.005.03, 5.6.0, 5.7.1  516 on HP-UX 10.20  11.00, AIX 4.2  4.3,
 DEC OSF/1 4.0 and WinNT 4.0 SP-6a,  often with Tk800.022 and/or DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/




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

2000-09-18 Thread Bart Lateur

On Mon, 18 Sep 2000 10:57:49 +0200, H.Merijn Brand wrote:

perl5 formats do NOT support lexicals

Eh? It looks like it, though.

my $foo;
format STDOUT =
@
$foo
.

$foo = 123;
write;
$foo = 45;
write;

It looks *so much* that way, that I think you must be wrong.

-- 
Bart.



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

2000-09-18 Thread H . Merijn Brand

On Mon, 18 Sep 2000 08:43:05 -0600, Tom Christiansen [EMAIL PROTECTED] wrote:
 I do not think you two are arguing about the same thing.
 
 Certainly as Bart has shown, formats *can* see lexicals.  Your
 illustration does not disprove that.  It simply shows that lexical
 scoping is static scoping, not dynamic scoping, and that the binding
 of the variable to the format occurs as the format is declared, not
 when a write executed.
 
 This is exactly the same thing as occurs with closures in terms of
 declaration/creation versus their execution.  All that matters is
 what's in scope when the format or closure template is brought into
 existence.  It doesn't matter what happens later, which would be
 dynamic scoping, not static scoping.  And this is surely not
 considered "not supporting lexicals".

Badly chosen words/phrasing. My fault, core dumped.

-- 
H.Merijn Brand   Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.005.03, 5.6.0, 5.7.1  516 on HP-UX 10.20  11.00, AIX 4.2  4.3,
 DEC OSF/1 4.0 and WinNT 4.0 SP-6a,  often with Tk800.022 and/or DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/