Quote:
Originally posted by dthomson
First question ... why reserve *all* words starting with "Ice"? That seems a little restrictive.
Secondly, why does it apply to nested scopes?
|
Ice is a reserved prefix to create a naming scope that we can safely use for internal purposes. For example,
Ice is a module at the global level. If we were to allow you to define an identifier
Ice at the global level, we get a clash.
We applied the rule to identifiers in nested scopes because, again, it allows us to use
Ice as a prefix for generated identifiers. This is a problem in general: if a mapping generates new identifiers that are not present in the Slice definition, those identifiers must be generated into a separate namespace, otherwise they can clash with other legitimate identifiers. For an example, try compiling the code generated by an IDL-to-C++ compiler for CORBA if the IDL contains
interface foo and interface
foo_var. The IDL is valid, but the generated code cannot possibly compile.
So, in the end, we decided that
Ice was going to be our universal escape hatch for such cases.
Note that you can use
ice without any problems -- only
Ice is reserved.
So, if you really want to implement Pengo, I'm afraid that you will have to use
ice,
ICE, or, if you like,
FrozenWater
Cheers,
Michi.