develooper Front page | perl.perl5.porters | Postings from March 2000

disallow vnnn entirely?

Thread Next
Joseph N. Hall
March 23, 2000 21:19
disallow vnnn entirely?
Message ID:
After pondering this for a couple of days, on balance, I think it would
be best to disallow vnnn entirely and require v-thingies to have at
least one dot in them.

I can whip out a bewildering array of grody examples to prove my
point, including barewords and subroutine names and that eval perlbug
(which is "fixed" with eval "+v1234" or anything else that forces
v1234 into expression context).  I imagine p5p has been there before, 
but here's my vote:

  Before this v-thing takes root, I BEG you to shut this aspect 
  of it off.

It is convenient to write v1234 but why not change that to v{1234}, 
which is probably still more convenient than "\x{1234}", and as I
suggested earlier, would allow generalization to v{""},
$string = ""; v{$string}, etc., if that were deemed useful.

I'm still not sure, though, that v200.200 doing one thing and 
v200.1000 doing something entirely different is going to work.  In
fact that looks like a Very Bad Thing to me.  Maybe you need to
be able to tell 'v' whether it's supposed to be making a UTF-8 
string out of v200.200.

It sure as hell is WRONG for v200.200 to be bytes and v200.1000 to
be UTF-8 -- regardless, even, of whether use utf8 is in effect!

The docs that mention using v-thingies and/or %vd for IP address
related stuff are very scary at this point.


Joseph N. Hall, 5 Sigma Productions        mailto:" <joseph> "
Author, Effective Perl Programming . . . . .

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