[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: get_local() and "(for index/limit/stop)"
- From: Asko Kauppi <asko.kauppi@...>
- Date: Fri, 17 Sep 2004 14:33:53 +0300
I think making '_' work like a /dev/null in variable land would be a
17.9.2004 kello 14:27, David Given kirjoitti:
On Thursday 16 September 2004 01:28, Fabio Mascarenhas wrote:
Depends on how you interpret the for loop. If you interpret the loop
Actually, I'd rather like the loop variable to be made read-only, so
compiler will produce an error or at least a warning if you try and
loop variable. Given that the current behaviour is undefined it's not
useful thing to want to do anyway... and I can't count the number of
I've had obscure bugs due to accidentally modifying a loop variable.
due to this:
for _, i in list do
_, j = somefunction()
On a slightly related note, is there any chance of getting real syntax
discarding a return value? The convention above of using _ for unwanted
arguments is misleading; it's actually creating a variable called _.
a while before I realised this, hence the above code.
Does anyone actually use variables called _ for any real purpose, and
+- David Given --McQ-+
| email@example.com | Uglúk u bagronk sha pushdug Internet-glob
| (firstname.lastname@example.org) | skai.
+- www.cowlark.com --+