Author: Daniel Clausen
Date: 02:00:23 08/21/02
Go up one level in this thread
On August 21, 2002 at 04:24:02, Russell Reagan wrote: >On August 21, 2002 at 03:49:18, Daniel Clausen wrote: > >>On August 20, 2002 at 23:16:03, Russell Reagan wrote: >> >>[snip] >> >>>The levels of truth: >>> >>>3. What you read in a book >> >>Not if it's in a book which _defines_ what ANSI-C is. Definitions can't be >>wrong. That can be useless probably, but not wrong. > >It doesn't matter what it is. If the ANSI-C standard says something, and my >compiler doesn't compile code I write that is "ANSI-C compliant", what good is >that? That's a broken compiler in my book. :) Ok, I see, from a practical POV that's probably not very helpful. It nevertheless is a broken compiler though. >Maybe my program will compile next year when they release the next >version of the compiler? I'll *ONLY* have to wait a year... I assume you're using M$VC. With gcc you only have to wait 2 days. :) Seriously, I wish compilers would be "more ANSI-C compliant", especially if they claim to be. I guess they're much better these days though. (finally..) >You are confusing things here I think. When I say "what it does when you run >it", I don't mean that you shouldn't pay attention to what the standard is, or >platform specific things, etc. My point is that if the documentation says one >thing, or the book says one thing, and the thing doesn't work right, that's no >good. Since I'm coming from a more exotic platform than you, I'm probably more 'sensitive' towards standards. Whenever possible (at home almost always, at work less then I wish I could) I try to follow the standard (that's not just 'a book' or 'documentation', it's the _definition_ of the language) So basically, first I try to follow the standard 100% and afterwards I check whether it does what it's supposed to do. As I said, this is something I can almost always do at home, but less at work. >My point is not that you should just "do whatever works", but that you should >make sure whatever you are doing works, and make sure it's working correctly, >because things don't always work as they're documented to. C and C++ are >perfect examples. Agreed, but: If an ANSI-compliant compiler behaves differently than the ANSI-standard says, it's _always_ the compilers fault. If an ANSI-compliant compiler behaves differently than a C/C++ book by someone, then it can either be the books or the compilers fault. >Look at all of the non-compliance that has gone on, and that still >does go on to a lesser degree. Oh, just take HTML and you can skip the "lesser degree" I guess. :)) Sargon
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.