develooper Front page | perl.perl5.porters | Postings from February 2007

Re: Future Perl development

From:
Nicholas Clark
Date:
February 7, 2007 03:49
Subject:
Re: Future Perl development
Message ID:
20070207114853.GZ5748@plum.flirble.org
On Tue, Feb 06, 2007 at 08:37:48PM -0800, Marvin Humphrey wrote:

> I've since been taught to avoid mixing different kinds of scalars,  
> but I would have been better off if Perl itself had taught me that,  
> by throwing an error when I tried that operation.

This is one of the big legacy bugs of 5.6. It shouldn't matter in perl-space
(ie non-XS), but it interacts with the other bug - conflating "I'm stored in
UTF-8" with "I want Unicode text matching semantics"

(The third was that 5.6 de-facto changed the XS API, with SvPV() and friends
no longer quite meaning what they used to. They should have attempted to
auto-downgrade anything UTF-8. I think that that would actually have rendered
the first bug a non-bug)

Perl 5 has ploughed this furrow for 7 years now - it's hard to see how to
change direction on the first without breaking a lot of stuff that is now
correct. The second might be fixable given 1 more flag bit, 2 more stable
releases and a depreciation cycle. So that would be for 5.14

> I wish that Perl had at least two different kinds of scalars, each  
> with its own vtable for dispatching such behaviors...

> ... in a perfect world, that is.

Yes. The punchline from the "Irishman giving directions" joke applies here:

  If I were you sir, I wouldn't start from here.


One of the reasons for Perl 6 was to avoid this whole bloody mess.
Unicode from the start, rather than a messy retrofit.

Nicholas Clark



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About