Front page | perl.perl5.porters |
Postings from March 2000
disallow vnnn entirely?
Thread Next
From:
Joseph N. Hall
Date:
March 23, 2000 21:19
Subject:
disallow vnnn entirely?
Message ID:
MailDrop1.2d7j-PPC.1000323221910@perlfaq.com
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{"1.2.3.4"},
$string = "1.2.3.4"; 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
--
Joseph N. Hall, 5 Sigma Productions mailto:" <joseph> "@5sigma.com
Author, Effective Perl Programming . . . . . http://www.effectiveperl.com
Thread Next
-
disallow vnnn entirely?
by Joseph N. Hall