landauer@morocco.Sun.COM (Doug Landauer) (04/13/90)
> Personally, I believe the local class in C++ is a kind of tradeoff of > limited levels of lexical scoping (at most two levels) and consistency > with C programming. 1. The term "local class" is ambiguous (can mean class-within-function, or class-within-class), and should not be used. 2. The "local class" you're talking about (class-within-function) is a direct result of C compatibility (struct-within-function must be allowed) versus self-consistency (struct == class { public: ... }). It should not be used (except in existing C code). 3. The other "local class" (class-within-class) changes meanings drastically as of cfront 2.1 and/or X3J16 and/or BS's forthcoming book, so it too should not be used (at least wait until next year). Conclusion: The ambiguous term "local class" is an epithet in C++ any way you translate it. -- Doug Landauer - Sun Microsystems, Inc. - Languages - landauer@eng.sun.com Matt Groening on C++: "Our language is one great salad." -- Disclaimer: I was just kidding about not using them. They're just a few more mines to step in.