Re: Iterating over an array style question
On Thu, 25 Nov 2010, Stefan Ram wrote:
Tom Anderson <twic@urchin.earth.li> writes:
Statements in imperative languages don't have side-effects; they have
effects. That's what they're for.
Hey, don't steal my opinions! This is already my opinion!?
Too late!
Well, after all, statements in imperative languages
might have ?side-effects? if we agree to use this
term for any effects not specified in the documentation.
Alright. Although i usually use the term 'bug' for those.
For example, the execution of the following statement
has two effects:
++i;
1st It increments i.
2nd It heats my room (via the microprocessor, which
gets heated by the execution).
However, ?2nd? is not a specified effect, so it might be
called ?side-effect?. (Writing data to a memory of n bits
at Temperature T will at least create the heat k ln(2) T,
where k is Boltzmann's constant.)
Definitely a bug.
AIUI and OT, what creates the heat is *destroying* bits - in this case,
the values that were in the memory before it was written to. A crafty plan
my colleagues and i came up with over dinner the other evening was to
arrange microprocessors and memory to decouple the changing and
destruction of bits; in the case of memory, this would involve a second
cable coming out of the back of the DIMM, carrying the bits displaced from
the memory by fresh writes, and leading to some sort of random bit bucket.
The bit bucket could just destroy the discarded bits; this would produce
heat, but would at least do it somewhere remote from the actual work,
which could be more easily cooled. A development of this idea would be to
export the bits via the network interface, then ship them over the
internet to cold places, where they could be destroyed for heating. An
alternative would be that the bits would not be destroyed, but mixed about
a bit and then recycled as high-quality random bits. As the use of
cryptography becomes more widepsread, the demand for random bits is
increasing, so this could simultaneously meet this need and dispose of
unwanted boolean values without accelerating the heat death of the
universe.
Here, I express this opinion in German in 2006:
|Message-ID: <Kriterien-20060831221618@ram.dialup.fu-berlin.de>
|(...)
|Ich bin der Meinung, da? das, was man "side-effect" nennt,
|am besten "Wirkung" genannt werden sollte
(?It is my opinion, that, what is called "side-effect", should
better be called "effect")
So is there no German for 'side-effect', or no English for 'Wirkung'?
tom
--
AVOID PS3 LIKE MCVITIE'S PLAGUE HOBNOBS -- UKR