|
|
|
|||||
|
ICE preprocessor
"""
The only purpose for which #ifndef, #define, and #endif directives can be used is to create a double-include block. """ This seems rather odd... if that is truly the only purpose, can't that be a rule the compiler must implement - no files will be processed more than once? Is your statement also meant to preclude the inclusion/exclusion of code by setting a macro outside the file like so: compiler -DDEBUG source_file.ice ------------------ source_file.ice ---------------- interface myInterface { void foo(); #ifdef DEBUG void printInternalState(); #endif }; Oh, and for goodness sakes, can't we make the semicolon at the end of a type definition optional (or kill it altogether)? Forgetting it will be a very common mistake. It was easy enough to remember when all you programed in was C++, but now with Java, C#, etc, it becomes half impossible to remember it! -Yonik |
|
|||||
|
My question was more about why can't the slice compiler prevent multiple inclusion on it's own. It's certainly cleaner.
It looks more like you included #define directives simply to prevent multiple inclusion. And you need to prevent multiple inclusion that way because you are using the C preprocessor in your implementation. That's not a great reason IMHO. |
|
||||||
|
Quote:
I think it might be possible to modify the Slice parser to automatically skip over files that are included more than once. I'll have a look at this when I get back to Australia in early October. Cheers, Michi. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|