develooper Front page | perl.perl5.porters | Postings from December 2014

Re: *-couragement of $^V

Thread Previous | Thread Next
From:
David Golden
Date:
December 9, 2014 15:27
Subject:
Re: *-couragement of $^V
Message ID:
CAOeq1c_zrGQYkzneKoBUvR_B8O4evhSbGQAi-bouXyGbOYhurg@mail.gmail.com
On Mon, Dec 8, 2014 at 3:30 PM, Ricardo Signes

> I suggest that given the general confusion around v-strings and version
> objects, as well as the fact that $^V has changed its behavior in the
> past, it
> is not actually better than $].  Since $] always works, and always works
> the
> same way, we should encourage its use rather than $^V's.  We can accomplish
> that by discouraging the use of $^V, in favor of $], in the docs.
>
> Yes?
>

No.

The same logic would say we should discourage the // operator.

$^V wasn't really useful until it became a version object.  When toolchain
finally drops v5.8 support, and we're all dragged kicking and screaming
into using a Perl major version less than 10 years old[1], then $^V is fine
to use.  I don't see any point in discouraging it even before it ever
becomes useful.

I do think the docs for $^V and $] could use a major rewrite to more
clearly explain what each is and when/how each can be used.  I'm willing to
volunteer to do that or to be a reviewer of someone else's attempt.

David

[1] except for Ribasushi and David Cantrell, bless their hearts

-- 
David Golden <xdg@xdg.me> Twitter/IRC: @xdg

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