From the Ice documentation, section 4.5.3 "Identifiers":
First question ... why reserve *all* words starting with "Ice"? That seems a little restrictive.Reserved Identifiers
Slice reserves the identifier Ice and all identifiers beginning with Ice for the Ice implementation. For example, if you try to define a type named Icecream , the Slice compiler will issue an error message.
Secondly, why does it apply to nested scopes? For example, say I was designing a distributed version of a popular arcade game from 1982:
Pengo::Ice is invalidCode:module Pengo { struct Position { short x; short y; }; interface Block { Position getPos(); }; interface Ice extends Block // Ouch!! This won't work! { void smash(); }; interface Penguin { void moveUp(); void moveDown(); void moveLeft(); void moveRigth(); }; };Even Pengo::IceCube is not permitted. The idea of modules is to partition off different scopes, so it could be irritating that I'm forbidden to use certain names in my *own* scopes! Especially as Ice is a common English word.
However, I'm confident there's a good reason, but I just can't think of it ... something to do with the generated code, perhaps?

Even Pengo::IceCube is not permitted. The idea of modules is to partition off different scopes, so it could be irritating that I'm forbidden to use certain names in my *own* scopes! Especially as Ice is a common English word.
Reply With Quote
