[1142] in Coldmud discussion meeting

root meeting help first first in chain previous in chain previous next next in chain last in chain last

Re: [COLD] scatter/optional assignments - request for discussion

daemon@ATHENA.MIT.EDU (Fri Nov 29 09:56:01 1996 )

Date: Fri, 29 Nov 1996 09:50:36 -0500 (EST)
From: Fabien Ninoles <ninf01@gel.usherb.ca>
To: Miroslav Silovic <Miroslav.Silovic@public.srce.hr>
Cc: coldstuff@cold.org
In-Reply-To: <199611291401.PAA11414@jagor.srce.hr>

-----BEGIN PGP SIGNED MESSAGE-----

On Fri, 29 Nov 1996, Miroslav Silovic wrote:

> This patch implements two new features:
> 
> Optional assignment expression:
> 
> 	foo ?= bar;
> 
> is equivalent to
> 
> 	if (!foo) foo=bar;
> 
> Scatter assignment is easiest to explain with a few examples:
> 
> 	[foo, bar] = [1,2]
> 	=> foo=1, bar=2
> 
> 	[foo, bar ?= 10] = [1]
> 	=> foo=1, bar=10
> 
> 	[foo, bar, @baz] = [1,2,3,4,5]
> 	=> foo=1, bar=2, baz=[3,4,5]
> 
> 	[[foo, bar], @rest] = [[1,2],[3,4],[5,6]]
> 	=> foo=1, bar=2, rest=[[3,4],[5,6]]
> 
> -----------

Very cool, very useful... can be used as optional arguments...

> 
> The question I have (Brandon and I talked about it) is: when to release
> this patch? The possibilities:
> 
> 	1) in the next patchlevel
> 	2) wait till the core is out
> 	3) rename the current driver to 1.1 and then add it to 1.1p1
> 	4) release in the next patchlevel but keep quiet about it
> 	   (consider it 'undocumented feature' till 1.1)
> 
> Personally, I'm in favor of 4). I don't like 2), because this is *VERY*
> useful, and I don't like 3) because I think it's a good idea to have
> the Beta core out synchronously with 1.1 driver.
> 
> 
> Oppinions?
> 
> 	Miro
> 
> PS. Enjoy the patch. :)
> 

Just a question, are they a lot of other undocumented features in the
current driver? 

Thanks

- ---------------------------------------------------------------
 "Our policy is, when in doubt, do the right thing."   
                                          -- Roy L Ash
- ---------------------------------------------------------------
Fabien Ninoles aka Baffouille       || Running Debian-Linux
Ninf01@gel.usherb.ca                || Lover of MOO, mountains, 
http://www-edu.gel.usherb.ca/ninf01 || poetry and Freedom.
- ---------------------------------------------------------------

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQCVAwUBMp74KlX6fc7jcjhFAQHJFwP+Nyu+/G2T3oR3fFiS+6lDTq7kJG0qsdVF
nGA/y385m5Q7t2qEyvgQBSF9jQr9BxCq4wAR5UhFSLIrfh7vPVEdLAZymaQ+sB9e
53snho/Djaw431JRsAUvxqCDLu6KmR3jvrGx2WxcNveuhyhVYSFqLkPvM6hvsrPn
aApkt2QNBsY=
=rCzH
-----END PGP SIGNATURE-----