J
Julie
What would be the primary motivation to make a class 'sealed' (meaning that you
can't derive from it) in C++? (I understand that there is currently no sealed
keyword in C++, but that there are techniques to accomplish this. From what
I've heard, sealed may be added to the language in the future?)
I understand that there are compiler and efficiency reasons (optimizing away
virtual function calls, etc.) that justify it in other languages, but I'm not
interested in that. I'm asking strictly from an design standpoint (where minor
efficiency gains are not important).
I've briefly search Google/Google Groups, but didn't find anything that really
answered my question. Links, books, or other authoritive resources would be
appreciated, as well as personal (objective) responses.
Thanks -- Julie
can't derive from it) in C++? (I understand that there is currently no sealed
keyword in C++, but that there are techniques to accomplish this. From what
I've heard, sealed may be added to the language in the future?)
I understand that there are compiler and efficiency reasons (optimizing away
virtual function calls, etc.) that justify it in other languages, but I'm not
interested in that. I'm asking strictly from an design standpoint (where minor
efficiency gains are not important).
I've briefly search Google/Google Groups, but didn't find anything that really
answered my question. Links, books, or other authoritive resources would be
appreciated, as well as personal (objective) responses.
Thanks -- Julie