Re: Scope exit and timely destruction

2005-01-14 Thread Hildo Biersma
Leopold Toetsch wrote: Given is a Perl snippet like: { my $fh = IO::File->new; $fh->open(">test.tmp"); print $fh "a"; } The filehandle is closed automatically at scope exit and the file contains the expected contents. That's quite easy in the current Perl implementation as it d

Questions on NCI for nasty library

2004-08-13 Thread Hildo . Biersma
>>>>> "Hildo" == Hildo Biersma <[EMAIL PROTECTED]> writes: Hildo> I'm looking at writing Parrot support for a vendor library: IBM MQ Hildo> (Message Queueing, aka "MQSeries", aka "WebSphere MQ"). The current Hildo> perl mod

Re: Questions on NCI for nasty library

2004-08-10 Thread Hildo . Biersma
> "Nick" == Nicholas Clark <[EMAIL PROTECTED]> writes: Nick> On Mon, Aug 09, 2004 at 08:53:27AM -0400, [EMAIL PROTECTED] wrote: >> - MQ has constants. Thousands of them. In the perl module, these get >> mapped to perl XS subroutines (which bloats the symbol table no >> end). For parrot, I'd

Questions on NCI for nasty library

2004-08-09 Thread Hildo . Biersma
I'm looking at writing Parrot support for a vendor library: IBM MQ (Message Queueing, aka "MQSeries", aka "WebSphere MQ"). The current perl module (which I maintain) uses XS code and Parrot's NCI should simplify this a lot. I have two questions though: - MQ has some data structures that are a ta

Modules, Versioning, and Beyond

2001-08-02 Thread Hildo . Biersma
> "Bryan" == Bryan C Warnock <[EMAIL PROTECTED]> writes: Bryan> Using Multiple Versions Of The Same Module In One Program Bryan> There are a lot of reasons why this isn't a good idea, or even Bryan> possible in places. Non-Perl code on the backend, for Bryan> instance, will probably prevent

RE: Really auto autoloaded modules

2001-02-04 Thread Hildo . Biersma
> "Dave" == Dave Storrs <[EMAIL PROTECTED]> writes: Dave> When you want to install a new version, you simply prepend it Dave> with its version number (or insert it at appropriate place). Dave> The order is, of course, irrelevant...you can order it as 1.3, Dave> 2.0, 1.0 if you want, but the

Re: standard representations

2000-12-27 Thread Hildo Biersma
Damien Neil wrote: > > On Wed, Dec 27, 2000 at 02:06:45PM -0500, Hildo Biersma wrote: > > I don't recall the bit sizes to be in ANSI C. Which paragraph is that > > in? > > You need to deduce the bit sizes, as the standard doesn't speak in > terms of bits.

Re: standard representations

2000-12-27 Thread Hildo Biersma
Damien Neil wrote: > > On Wed, Dec 27, 2000 at 10:46:03AM -0500, Philip Newton wrote: > > So a native int could be 8 bits big? I think that's allowed according to > > ANSI. > > ANSI/ISO C states: > char <= short <= int <= long > > char >= 8 bits > short >= 16 bits > int >= 16 bits >

Re: Perl6 compatibility with non-C enviornments (was Re: Perl6 in Java? (was Re: Meta-design))

2000-12-08 Thread Hildo Biersma
"Bradley M. Kuhn" wrote: > > > On Wed, 6 Dec 2000, Bradley M. Kuhn wrote: > > > > > And, it will make the barrier for entry for new internals hacker lower. > > Sam Tregar <[EMAIL PROTECTED]> wrote: > > > Really? Do you honestly believe there are more Java programmers than C > > programmers? P

Re: My reading list

2000-10-24 Thread Hildo Biersma
Nicholas Clark wrote: > > On Mon, Oct 23, 2000 at 06:25:44PM -0700, Ask Bjoern Hansen wrote: > > :-) For those who haven't read them the Steve Maguire books are > > really really good. Hallo, no matter what you think of the software > > they shrinkwrap and sell they must (as a huge software comp

Re: RFC 328 (v1) Single quotes don't interpolate \' and \\

2000-09-30 Thread Hildo Biersma
Nicholas Clark wrote: > > What do you mean by "need"? Strings need to be able to contain single > quotes, but single quotes are not the only way to build a string. Single > and double quotes don't generate a different fundamental type; a double > quoted string with no variable interpolation also

Re: RFC 331 (v1) Consolidate the $1 and C<\1> notations

2000-09-29 Thread Hildo Biersma
> =head1 ABSTRACT > > Currently, C<\1> and $1 have only slightly different meanings within a > regex. Let's consolidate them together, eliminate the differences, and > settle on $1 as the standard. Sigh. That would remove functionality from the language. The reason why you need \1 in a regu

Re: RFC 328 (v1) Single quotes don't interpolate \' and \\

2000-09-29 Thread Hildo Biersma
> =head1 ABSTRACT > > Remove all interpolation within single quotes and the C operator, to > make single quotes 100% shell-like. C<\> rather than C<\\> gives a single > backslash; use double quotes or C if you need a single quote in your > string. Single-quoted strings need to be able to conta

Re: RFC 288 (v1) First-Class CGI Support

2000-09-25 Thread Hildo Biersma
Perl6 RFC Librarian wrote: > > =head1 ABSTRACT > > Perl is frequently used in CGI environments. It should be as easy to write > CGI programs with perl as it is to write commandline text filters. > > =head1 DESCRIPTION > > Tom Christiansen proposed this in his perl6storm message: > >

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

2000-09-18 Thread Hildo Biersma
> > =head1 NOTES ON FREEZE > > > > The only comments received were on my crappy examples, which have been > > clarified. Everyone seemed to like the idea. > > Personally I hated it. And I distinctly remember saying so. And I > still hate it. I dislike it too. URIs are a user-space matter and sh

Re: RFC 238 (v1) length(@ary) deserves a warning

2000-09-16 Thread Hildo Biersma
Bart Lateur wrote: > > On Sat, 16 Sep 2000 10:26:48 +0100, Hildo Biersma wrote: > > >> length(@ary) deserves a warning > > > >Right now, the Lint back-end gives a warning in these cases (use of > >array in scalar context). > > > >Can we make th

Re: RFC 241 (v1) Pseudo-hashes must die!

2000-09-16 Thread Hildo Biersma
> =head1 ABSTRACT > > Pseudo-hashes and the associated fields pragma shoule be removed from > Perl 6. A few counter points: Removal of pseudo-hashes should not stop us from using this (or a similar mechanism) under the covers in perl6 to implement strongly typed objects. AFAIK, most of the pai

Re: RFC 238 (v1) length(@ary) deserves a warning

2000-09-16 Thread Hildo Biersma
> =head1 TITLE > > length(@ary) deserves a warning Right now, the Lint back-end gives a warning in these cases (use of array in scalar context). Can we make the RFC more generic, and propose to move the Lint warnings into the core? Hildo

Re: Backtracing contexts with self($n) (was Re: RFC 223 (v1) Objects: C pragma)

2000-09-16 Thread Hildo Biersma
Nathan Wiger wrote: > > > I think such modules are a bad idea, because their functionality is > > typically restricted. > > What, you mean like CGI.pm ?! :-) Yes, restricted. If you use the procedural interface to a module that supports both OO and procedural interfaces, you're basically at th

Re: RFC 223 (v1) Objects: C pragma

2000-09-16 Thread Hildo Biersma
John Porter wrote: > > Hildo Biersma wrote: > > > > I think such modules are a bad idea, because their functionality is > > typically restricted. > > Oh? Where do you get that idea? Think about it. If a module supports both an OO and a procedural interface, t

Re: RFC 223 (v1) Objects: C pragma

2000-09-15 Thread Hildo Biersma
Nathan Wiger wrote: > > > > and this may, indeed, be sufficient. > > Remember, this still won't solve the problem of a module whose functions > can handle both OO and function-oriented calls - and yes, I have many > that do this. :-) I think such modules are a bad idea, because their functional

Re: Draft RFC: new pragma: C

2000-09-13 Thread Hildo Biersma
Piers Cawley wrote: > > > This is a bit dangerous, since we can get into ambiguities again. > > If I have A::B::C::Foo, A::B::C::Bar, X::Y::Z::Foo and X::Y::Z::Bar, > > I'd like to use shorthands for A::B::C's Foo and X::Y::Z's Bar at the > > same time. > > Well you can't. The patch that I pinc

Re: Draft RFC: new pragma: C

2000-09-13 Thread Hildo Biersma
Piers Cawley wrote: > =head1 ABSTRACT > > Cnew> > is a pain in the bum to type. We should replace this with > > use namespace 'Big::Long::Prefix'; > my ::Class $object = ::Class->new; This is a bit dangerous, since we can get into ambiguities again. If I have A::B::C::Foo, A::B::C::Bar

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

2000-09-13 Thread Hildo Biersma
> =head1 TITLE > > Make length(@array) work Counter-proposal: make length(@array) a syntax error. I don't feel like rewarding stupidity, I'd rather teach people how to do things properly. Hildo

Re: Draft RFC: my Dog $spot is just an assertion

2000-09-13 Thread Hildo Biersma
Piers Cawley wrote: > =head1 ABSTRACT > > The behaviour of the syntax should simply be an > assertion of the invariant: > >(!defined($spot) || (ref($spot) $spot->isa('Dog))) Apart from the buglet that Damian pointed out, agree. Instead of an implementation based on tie, I'd rather define

Re: New Perl rewrite - embedded Perl

2000-09-13 Thread Hildo Biersma
Bennett Todd wrote: > > I think the complaint about mod_perl's weight bears looking at, > despite the success of the INN embedding. One invocation of INN is > likely to do a sufficiently heroic amount of work that the weight > and bulk of a perl in there may well not hurt a bit. > > A single htt

Re: RFC 171 (v2) my Dog $spot should call a constructor implicitly

2000-09-01 Thread Hildo Biersma
Michael Fowler wrote: > > On Fri, Sep 01, 2000 at 08:31:17AM +0100, Hildo Biersma wrote: > > My previous concerns have not been adressed: > > - There may not be a default constructor > > If there is no implicit constructor method defined by the class, and the my >

Re: RFC 171 (v2) my Dog $spot should call a constructor implicitly

2000-09-01 Thread Hildo Biersma
Bart Lateur wrote: > > First: I don't like the idea of some user supplied code being called > whenever you declare a new variable, *unless* the author of the class > created a sub *especially written* for this purpose. Exactly. Even then, the arguments must match. So, if Dog::new() takes one a

Re: RFC 171 (v2) my Dog $spot should call a constructor implicitly

2000-09-01 Thread Hildo Biersma
Perl6 RFC Librarian wrote: >> =head1 DESCRIPTION > > What is currently an optimization for pseudo-hashes: > > my Dog $spot = Dog->new(); > > should be replaced with: > > my Dog $spot; > > which calls an implicit constructor (discussed further in the IMPLEMENTATION > section). The opt

Re: RFC 180 (v1) Object Class hooks into C

2000-08-31 Thread Hildo Biersma
> =head1 ABSTRACT > > There needs to be a way for an object class to define C format > specifiers for use in formatting objects into strings with C and > C. I find myself agreeing with your sentiment, but the approach in this RFC is not sufficiently general. Why only provide hooks for printf, n

Re: RFC 171 (v1) my Dog $spot should call a constructor implicitly

2000-08-30 Thread Hildo Biersma
Jonathan Scott Duff wrote: > > On Tue, Aug 29, 2000 at 11:04:26PM -0400, Michael Maraist wrote: > > First greatly stylistic compatibilty. An inexperienced programmer would > > see: > > my Dog $spot = "Spot"; > > > > And become confused. It's totally unintuitive (at least so far as other > > mai

Re: RFC 171 (v1) my Dog $spot should call a constructor implicitly

2000-08-30 Thread Hildo Biersma
Matt Youell wrote: > > So perhaps sometimes in Perl we could say: > > my Dog $spot = undef;# Automagically knows to be a Dog ref instead > of a Dog object because of the undef. > if ($age > 12) { > $spot = new Doberman(); > } else { > $spot = new Corgi(); >

Re: RFC 171 (v1) my Dog $spot should call a constructor implicitly

2000-08-30 Thread Hildo Biersma
> =head1 TITLE > > my Dog $spot should call a constructor implicitly > What, then, happens to the following code: my Dog $spot; if ($age > 12) { $spot = new Doberman(); } else { $spot = new Corgi(); } Would you seriously propose to create a Dog object, then wipe it in either branch if

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

2000-08-28 Thread Hildo Biersma
Nathan Torkington wrote: > > Damian Conway writes: > >> sub foo :lvalue { $foo } > >> post foo { die if $foo == 5 } > >> > >> eval { > >> foo() = 5; > >> }; > > > > Postconditions on lvalue subs are not tested until the end of the complete > > expression in whi

Re: RFC 155 - Remove geometric functions from core

2000-08-25 Thread Hildo Biersma
Tom Christiansen wrote: > > >If the behind-the-scenes shenanigans are invisible and performance is at > >worst acceptable, does it really matter how things are implemented? > > So long as you can still say things like > > perl -le 'print scalar getpwuid(1)' > > and that script still contin

Re: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)

2000-08-24 Thread Hildo Biersma
> =head1 TITLE > > Replace $self in @_ with self() builtin (not $ME) > Don't impose your religion on others. If people want 'this' instead of 'self', that should be just fine. It should be pretty easy to define the appropriate $ME-reader like this: use ObjectStyle 'self'; or use Object

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

2000-08-24 Thread Hildo Biersma
Larry Wall wrote: > > I expect that we'll get more compile-time benefit from > > my HASH sub foo { > ... > } > > %bar = foo(); Ah, the Return Value Optimization so loved in C++... For those who haven't seen it before, you can optimize this by passing in a reference to %bar

Re: RFC 95 (v2) Object Classes

2000-08-18 Thread Hildo Biersma
I disagree with this in so many places that I don't really know where to start... First, I do agree with the view perl should have better support for classes. Also, should the author want to, protection features from C++ (or other B&D languages) should be supported optionally. > NOTE: these and

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

2000-08-18 Thread Hildo Biersma
"David L. Nicol" wrote: > > Hildo Biersma wrote: > > > > > =head1 ABSTRACT > > > > > > Herein a new syntax is introduced to specify a sort function > > > for the keys of any hash. > > > > > > =head1 DESCRIPTION >

Re: Vtable speed worry

2000-08-18 Thread Hildo Biersma
Simon Cozens wrote: > > I'm obviously missing something about vtables. It'll be obvious when someone > corrects me, but... > > Currently, SvPVX(foo) requires one lookup; with a vtable, it would necessitate > two, (One to find the functino in "foo", and then the functino must find the > data in "

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

2000-08-18 Thread Hildo Biersma
> =head1 ABSTRACT > > Herein a new syntax is introduced to specify a sort function > for the keys of any hash. > > =head1 DESCRIPTION > > %professors{ $a->name cmp $b->name }; I feel the sort order should be specified on the iterator, not on the hash variable. It should be possible to

Re: McNamara's C<$#> as a property of any array element

2000-08-18 Thread Hildo Biersma
"David L. Nicol" wrote: > > What if its a method of anything in an array? $_ is already > a reference to the object on the array in for loops rather > than a copy of it. What if we make change be not something about > for loops, but about anything in an array? > > print "The index, in

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

2000-08-18 Thread Hildo Biersma
> =head1 ABSTRACT > > This RFC proposes that subroutine argument context specifiers be > extended in several ways, including allowing parameters to be typed and > named, and that a syntax be provided for binding arguments to named > parameters. I agree with most, if not all, of this RFC. > =h

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

2000-08-18 Thread Hildo Biersma
Chaim Frenkel wrote: > > DC> =head1 IMPLEMENTATION > > DC> Definitely S.E.P. > > What does that mean? Somebody Else's Problem. From one of the Douglas Adams novels.

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 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: date interface (was Re: perl6 requirements, on bootstrap)

2000-08-03 Thread Hildo Biersma
Matt Sergeant wrote: > > [I might join perl6-language some day, but until then, please CC me on all > Time::Object related messages] > > > On Wed, 2 Aug 2000 08:14:22 +0100 (BST), Matt Sergeant wrote: > > >I used to be a C programmer myself (well OK, I was a C++ programmer...), > >but I'd rat