Slashdot Mirror


User: mzraly

mzraly's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. Open classes on Ask Bjarne Stroustrup, Inventor of C++ · · Score: 1
    One of the differences between the namespace introduced by the 'class' construct and the namespace introduced by the 'namespace' construct is that one cannot add to class namespaces after the fact but one can add to non-class namespaces after the fact. Some languages, e.g. TOM, provide "open" classes -- classes to which other class users can add normal and virtual methods, even superclasses.

    One advantage of open classes is that they provide a way for the class user to introduce useful methods not thought of by the original class designer while retaining a uniform notation for accessing the functionality (a.new_method() versus new_function(a)).

    Do you think open classes are a good idea? Were they discussed at all during the standardization effort? If you were to design C++ all over again, would you consider them? Why or why not?