Go rant

"Jérôme M. Berger" jeberger at free.fr
Tue Dec 22 14:40:02 PST 2009


Andrei Alexandrescu wrote:
> retard wrote:
>> I use the Okasaki book as my bible when talking about purely 
>> functional data structures.
> 
> It's an awesome book. It's also very frank and tells things as they are, 
> as opposed to others (*cough*) that patronize the reader by artificially 
> making it seem so easy, it's amazing how Stoopid People missed the 
> point. Un-incidentally, Okasaki does not dabble in qsort. He does 
> describe mergesort - a perfectly sound and advantageous sorting methods 
> for lists.
> 
> Ok, I'm itching to share another gem.
> 
> "At this point you might be wondering how it's possible to program 
> without variables. How can you express something like X = X + 1 in 
> <language erased to protect the guilty>? The answer is easy. Invent a 
> new variable whose name hasn't been used before (say X1), and write X1 = 
> X + 1".
> 
	AIUI most compilers are able to do this themselves automatically 
and they use it for optimisation (SSA form). That being the case, 
it's ridiculous to force the programmer to take notice...

		Jerome
-- 
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20091222/a6f92412/attachment.pgp>


More information about the Digitalmars-d mailing list