Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Autovivi
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Deven T. Corzine  
View profile  
 More options Aug 13 2002, 5:48 pm
Newsgroups: perl.perl6.language
From: de...@ties.org (Deven T. Corzine)
Date: Tue, 13 Aug 2002 16:47:55 -0400 (EDT)
Local: Tues, Aug 13 2002 4:47 pm
Subject: Re: Autovivi

On Tue, 13 Aug 2002, Nicholas Clark wrote:
> On Tue, Aug 13, 2002 at 03:06:40PM -0400, Deven T. Corzine wrote:

> > The only accurate way to know if the code modifies the variables is to do
> > some sort of dataflow analysis, and it can't be 100% accurate even then.  
> > (Suppose a "shift" may or may not happen, depending on the parameters, then
> > $_[2] is modified?)  Of course, it should often be possible (at least in
> > principle) to determine that it's impossible for a particular parameter to
> > be modified, and play it safe by assuming "is rw" for undeterminable cases.

> Well, perl5 does already manage to avoid auto-vivifying hash keys when they
> are used as subroutine arguments. It uses magic, rather than dataflow
> analysis:

Yes, "magic" obviously can work, but it's a greater run-time penalty -- if
you do some sort of dataflow analysis, you pay the penalty at compile time
instead.  I'm not sure which is better, ultimately.  It probably varies.

Anyway, the Perl 5 magic you speak of presumably only works for a single
level of hash referencing -- we were specifically discussing a multilevel
reference, which immediately creates missing substructures in Perl 5, even
used in a read-only rvalue context in a simple Perl 5 expression...

Deven


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.