Back in the day, I thought
nested classes were cool. I thought using them would help
describe the structure of a program by saying "this object is
clearly part of this other object". Maybe that's true when the
nested class is never used independently outside of the parent
class. But now they just seem to serve to clutter class
declarations and cause a lot of extra overhead that doesn't add
much clarity.
I'm thinking specifically of the scope and symbol_record classes
that are nested inside the symbol_table class. Would anyone
object to moving the symbol_record and scope classes to separate
files and declaring them outside of the symbol_table class? As
far as I can see, backward compatibility with the old
symbol_table::scope or symbol_table::symbol_record can be
handled with a couple of typedefs.
Comments or suggestions?