ucbesvax.turner@ucbcad.UUCP (06/23/83)
#N:ucbesvax:4800014:000:1368 ucbesvax!turner Jun 22 05:02:00 1983 {~ In "The C Programming Language", Kernighan and Ritchie say of lint that "...it detects type mismatches, inconsistent argument usage,....Programs which pass through lint enjoy... freedom from type errors as complete as do, for example, Algol 68 programs." (p.3) My gripe is that when I pass pointers to structures out of one file to a function in another, lint only checks to see if the structures pointed to are the same size. They might differ structurally by quite a lot, otherwise. Either Algol 68 is less strongly typed than I had been led to believe, or lint is cutting a corner here. It might be a local anomaly, so if anyone would like to try it themselves, please be so kind as to inform me of any contrary result. Thanks (as always) in advance, Michael Turner ucbvax!ucbesvax.turner P.S. My other recent burn is "enum" types: why the @%$! can't you use them as array indices (which is quite natural, if you can recall your Pascal experiences without losing lunch)? Especially considering that you can assign them to "int" variables without so much as a peep from lint. Personally, about the only thing I miss from Pascal is strong-typing of array indices. While C need not go that far to satisfy me, it should *not*, at the very least, be going in the *wrong* direction. ~}
ucbmonet.arnold@ucbcad.UUCP (06/26/83)
#R:ucbesvax:4800014:ucbmonet:19200001:000:589 ucbmonet!arnold Jun 23 15:41:00 1983 You may be able to assign enums to ints without complaint, but you cannot initialize ints with enums, nor can you compare an int to an enum (on 4bsd vax unix, anyway) without a error messages galore. Can anyone tell me why they enums aren't considered just like they were consecutive #defines of constants? The only thing this doesn't catch I can think of that I would care about is the assigning of one enum variable the value of an enum member from a different enumeration. I would vote to lose this without a moment's hesitation if it meant being able to use enums like ints. Ken