[prev] [thread] [next] [lurker] [Date index for 2006/12/22]
Peter da Silva writes: > Oh, let's dredge up some luscious C hate. > > /* Comments /* Don't nest */ Unlike in PostgreSQL, where C-ish-syntax comments _do_ nest: /* SELECT foo FROM /* XXX: need better table and column names */ tbl WHERE bar = '/*'; */ Oh, hang on, that doesn't help at all. Consider this a hate for PostgreSQL's not-quite-C comments. HEY, LANGUAGE DESIGNER! DON'T ALLOW COMMENTS OF THE SAME SYNTAX TO NEST! Now, a C implementation that warns you when it finds a /* sequence inside a /*...*/ comment is definitely a good thing. I might even go so far as to describe as hateful an implementation that doesn't do that by default. Even better would be for the language to forbid /* inside a /*...*/ comment, but that's another story. > #if 0 > int ilTruc; / * il'Tuccadore (the man of 1000 faces) */ > #endif > > Which works fine [...] except when you hit a compiler that follows > Allman's design rather than Ritchie's and tokenizes the code inside > #if...#endif instead of whacking it out in the preprocessor, Such a compiler is buggy. There's a reason the standard says the compiler must behave as if it goes through the various processing phases in order. -- Aaron CraneThere's stuff above here
Generated at 14:01 on 28 Dec 2006 by mariachi 0.52