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
 
Larry Wall  
View profile  
 More options Aug 13 2002, 3:48 pm
Newsgroups: perl.perl6.language
From: la...@wall.org (Larry Wall)
Date: Tue, 13 Aug 2002 11:53:26 -0700 (PDT)
Local: Tues, Aug 13 2002 2:53 pm
Subject: Re: Autovivi
On Tue, 13 Aug 2002, mosulli...@crtinc.com wrote:

: From: Larry Wall la...@wall.org
: > Of course, there are issues here if the code modifies those
: > variables, since the issue of whether a variable is rw is
: > really distinct from whether it represents a pass by value
: > or reference.  Slapping a "constant" on it is a bald-faced
: > attempt to get the speed of pass-by-reference with the
: > guarantees of pass-by-value.  Perhaps there should be a way
: > to declare a parameter to be pass-by-value, producing a
: > modifiable variable that does not affect the caller's value.
: > But I'm not sure saving one assignment in the body is worth
: > the extra mental baggage.
:
: I'm not sure I read that right, but it sounds like you're implying that
: pass-by-values will be read-only.  Is that the plan?

The default is pass-by-reference, but non-modifiable.  If there's a
pass-by-value, it'll have to be specially requested somehow.

This is a minimal difference from Perl 5, in which everything was
pass-by-reference, but modifiable.   To get pass-by-value, you just
do an assignment.  :-)

Larry


 
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.