
----- Original Message ----- From: "Duncan Coutts - duncan.coutts@worc.ox.ac.uk" Sent: Thursday, December 08, 2005 9:09 PM
On Thu, 2005-12-08 at 11:29 -0800, Jeremy Shaw wrote:
The only case it is a benefit is when it accidentally happens and it's just a bonus, but in that case you never needed the optimisation it in the first place.
If you prefer consistently slower code to accidentilly faster one, you can still turn off the optimisations of your choice. :)
We already have this issue in Haskell with strictness.
This holds for nearly every automatical optimisation, doesn't it?
So if it were easy to find out the uniqueness that the compiler was inferring then it might actually be useful to people that it did such an inference. Since in that case they would be able to check that it was actually kicking in and modify their code if it were not. You would also want to be able to ask the questions "why is it not unique here when I expect it to be", just like the compiler currently answers our question of why the type is not what we expect it to be at some place in the program.
Duncan
I couldn't agree more. Regards, zooloo p.s.: Strangely, Tomasz's reply again appears as being sent from my address in the archive. Anyone knows why? p.p.s: At least as weirdly, the first version of my duplicated mail unexpectedly _has_ shown up again (after more than 5 hours), whilst another, later message of mine was posted within minutes! Sorry everyone for the inconvenience. -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.13.12/192 - Release Date: 05.12.2005