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

Re: Should we deprecate $; ?

Thread Previous | Thread Next
Michael G Schwern
May 13, 2003 15:21
Re: Should we deprecate $; ?
Message ID:
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

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

1. You are thin.
2. You look great.
3. You live in a castle with robot servants.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About