Colin, On Saturday 10 September 2005 18:38, Colin Carter wrote:
...
So while I'm sure you're right about any one compiler, it is very wrong to say that C does it, and suicidal to rely on it
I agree; you need to look at your own compilerS.
Wrong. You need to code to the standard so your code is immune to changes in the compiler or the environment in which it is to be run. When people use experiments with particular compilers to learn the language, they set themselves up for unpredictable behavior in the future.
I add the S because linking object code from two different languages can get one into a lot of trouble if they don't obey the same rules. Also one should note that some compilers pass addresses (best in my opinion) while others pass "values". (Values? C passes values sometimes and addresses if it feels like it, so be careful.)
You have got to be kidding. The language is quite clear about the distinctions between values, pointers and references and which is used when and while there are many areas where the compiler (writer) has discretion about its exact behavior, there's no such discretion (no "feels like it") when it comes to parameter passing and whether values, pointers or references are what's passed. That's a big part of what strong typing is about, after all. While no language can be used without understanding, C and C++ are more demanding than most in their subtleties. So be it.
...
Colin
Randall Schulz