[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: get_local() and "(for index/limit/stop)"
- From: Adrián Pérez <copylight@...>
- Date: Sat, 18 Sep 2004 13:08:29 +0200
El 17/09/2004, a las 13:33, Asko Kauppi escribió:
I think making '_' work like a /dev/null in variable land would be a
Great Thing.
I don't know wether it's a Great Thing (tm), but it is at least a Godd
Thing (tm)! I always see the underscore as a kitchen-sink variable.
This comes from functional languages like OCaml, that use underscores
just that way. Moreover, if you recognize "_" as such, you can make
optimizations to bytecodes, for example if you do:
_, a = my_function()
The compiler may skip generating bytecodes for the first argument, thus
gaining a bit in speed. Not a big gain, but it worths if you use "_" a
lot (using "_" is quite usual in functional programming).
-ap
Attachment:
PGP.sig
Description: Mensaje firmado digitalmente