develooper Front page | perl.perl5.porters | Postings from May 2003

Re: Should we deprecate $; ?

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
May 13, 2003 15:21
Subject:
Re: Should we deprecate $; ?
Message ID:
20030513222139.GB20528@windhund.schwern.org
On Tue, May 13, 2003 at 11:56:50PM +0200, Rafael Garcia-Suarez wrote:
> $; is the subscript separator for multidimensional array emulation
> (as says perlvar).  Basically it works like this :
> 
>     $ perl -MO=Deparse -e '$x{1,2}'
>     $x{join $;, 1, 2};
> 
> In our Unicode and UTF8 world, it's becoming more and more unsafe to use
> that kind of hack, esp. when better alternative solutions are available.
> 
> I therefore suggest to add to 5.9 a deprecation warning
> 
>     "Use of multidimensional array emulation is deprecated"
> 
> for any use of the implicit join($;,...).

FWIW, Tie::Math makes good use of it because writing tied, multi-dimensional
data structures is a pain in the ass.  Its easier to handle:  $tied{1,2,3} 
than $tied{1}{2}{3}.

Its also smaller and faster than working with multidimensional data
structures.

As I'm more concerned about speed, size and ties than Unicode, I'd say leave
it.


-- 
1. You are thin.
2. You look great.
3. You live in a castle with robot servants.
        -- http://www.angryflower.com/anaddi.gif

Thread Previous | Thread Next


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