Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

[perl #113620] highly illegal variable names are now accidentally legal

 

 

First page Previous page 1 2 3 Next page Last page  View All Perl porters RSS feed   Index | Next | Previous | View Threaded


nick at ccl4

Feb 20, 2013, 2:49 AM

Post #51 of 52 (7 views)
Permalink
Re: [perl #113620] highly illegal variable names are now accidentally legal [In reply to]

On Wed, Feb 20, 2013 at 06:49:13AM -0300, Brian Fraser wrote:

> I can't find anything beyond "because the parser allows it." We have a
> handful of tests for things like this:
>
> package Foo::;
> sub bar{1}
> package main;
> sub foo::::::bar{1}
> Foo::::bar();
> foo::::::bar();
>
> But besides the novelty, is that of any worth?

I don't *think* so.

Also, I'm suspicious that most of the tests are there more to ensure that
behaviour doesn't change accidentally, than to say "this is correct".

At least one test for something like this was added because there turned
out to be an unexercised code path in the C, and I'd assumed that it was
unreachable, when it turned out simply to be untested.

So don't assume that the tests are gospel, or some sort of spec.

Nicholas Clark


fraserbn at gmail

Feb 27, 2013, 3:39 AM

Post #52 of 52 (5 views)
Permalink
Re: [perl #113620] highly illegal variable names are now accidentally legal [In reply to]

On Wed, Feb 20, 2013 at 7:49 AM, Nicholas Clark <nick [at] ccl4> wrote:
> On Wed, Feb 20, 2013 at 06:49:13AM -0300, Brian Fraser wrote:
>
>> I can't find anything beyond "because the parser allows it." We have a
>> handful of tests for things like this:
>>
>> package Foo::;
>> sub bar{1}
>> package main;
>> sub foo::::::bar{1}
>> Foo::::bar();
>> foo::::::bar();
>>
>> But besides the novelty, is that of any worth?
>
> I don't *think* so.
>
> Also, I'm suspicious that most of the tests are there more to ensure that
> behaviour doesn't change accidentally, than to say "this is correct".
>
> At least one test for something like this was added because there turned
> out to be an unexercised code path in the C, and I'd assumed that it was
> unreachable, when it turned out simply to be untested.
>
> So don't assume that the tests are gospel, or some sort of spec.
>
> Nicholas Clark

Alright, thanks! The latest commit in the branch introduces the
simplifications for package delimiters, except for 'package Foo::;',
which I couldn't figure out how to remove easily. I think the branch
is ready for merging/likely more review -- although if the last commit
is contentious, the previous one should also be ready.

First page Previous page 1 2 3 Next page Last page  View All Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.