<HEAD><TITLE>discuss@charon: [1147] in "Coldmud discussion meeting"</TITLE>
<H1>[1147] in Coldmud discussion meeting</H1></HEAD>
<A HREF="/"><IMG SRC="/i-d.gif" ALT="root"></A>
<A HREF="?1147"><IMG SRC="/i-back.gif" ALT="meeting"></A>
<A HREF="/help.html"><IMG SRC="/i-help.gif" ALT="help"></A>
<A HREF="1"><IMG SRC="/i-first.gif" ALT="first"></A>
<A HREF="1141"><IMG SRC="/i-fref.gif" ALT="first in chain"></A>
<A HREF="1146"><IMG SRC="/i-pref.gif" ALT="previous in chain"></A>
<A HREF="1146"><IMG SRC="/i-prev.gif" ALT="previous"></A>
<A HREF="1148"><IMG SRC="/i-next.gif" ALT="next"></A>
<A HREF="1148"><IMG SRC="/i-nref.gif" ALT="next in chain"></A>
<A HREF="1149"><IMG SRC="/i-lref.gif" ALT="last in chain"></A>
<A HREF="1641"><IMG SRC="/i-last.gif" ALT="last"></A>
<HR><H2>Re: [COLD] scatter/optional assignments - request for discussion</H2>
<H3>daemon@ATHENA.MIT.EDU (Fri Nov 29 19:31:12 1996
)</H3>
<PRE>
From: Andrew Wilson &lt;andrew@aaaaaaaa.demon.co.uk&gt;
To: Brandon Gillespie &lt;brandon@glacier.cold.org&gt;
Date: Fri, 29 Nov 1996 23:57:39 +0000 (GMT)
Cc: Miroslav.Silovic@public.srce.hr, coldstuff@cold.org
In-Reply-To: &lt;Pine.NEB.3.95.961129143634.7322A-100000@glacier.cold.org&gt; from "Brandon Gillespie" at Nov 29, 96 02:40:26 pm

&gt; &gt; I didn't look too closely at this patch, but am I right in thinking
&gt; &gt; that the ?= operator is a simple test of existing value, rather
&gt; &gt; then an operation which is only performed if a variable has not
&gt; &gt; been assigned to previously?
&gt; &gt; 
&gt; &gt; Perl has a useful:
&gt; &gt; 
&gt; &gt; 	$foo = $bar unless $foo;
&gt; &gt; 
&gt; &gt; construction, which only assigns a value to $foo if no previous
&gt; &gt; assignment has taken place.
&gt; &gt; 
&gt; &gt; Wouldn't this be logic (expressed as '$foo ?= $bar') be more useful?
&gt; &gt; 
&gt; &gt; Ay (prepared to be clueless...)
&gt; 
&gt; IMHO no--perl's "unless" drives me up the wall (along with a few of its
&gt; other operators).  It changes the focus from left to right to right to
&gt; left simply for the fact that then it can use a cute word rather than an
&gt; operator and it supposedly makes 'sense' as you read it. Using ?= stays
&gt; left oriented, and fits in with existing operators, and is also shorter :) 
&gt; (it also 'reads' better IMHO):

[snip]

Sure.  I don't care about the syntax and ?= is better than unless,
and I want' suggesting that a different syntax be used.  I wanted
to know if the 'if' test implicit in ?= was on the existing value
of the variable or if it was a test for wether or not a value had
been assigned to the variable.

It may be the case that it really doesn't matter which property of
a variable you test (its value, or its settedness).  In which case
fine.

Ay.
</PRE>
