TITLE: the future of C++ from Bjarne (Source: Saul Tamari [saul@exanet.com]) >From an interview by Danny Kalev at http://www.itworld.com/AppDev/710/lw-02-stroustrup/ regarding a future C++ revision. LinuxWorld.com: Are there any features or concepts in other fledging languages, say Python or Ada95, that you would like to see added to C++? Does C++ need any additional features or libraries at all? Bjarne Stroustrup: I would like to see the upcoming revision of the C++ standard focus on libraries. The work on the language itself could be limited to correction of mistakes, to making the language more uniform, to provide minor extensions to support popular paradigms, and to provide guarantees needed for libraries. For example, I suspect that concurrency is best supported by a library and that such a library can be implemented without major language extensions. However, such a library might need some additional guarantees written into the standard. In addition, I'd like to see a merger of C and C++. Consider "major" language facilities often discussed for C++: Concurrency: I'd like to see a library supporting threads and a related library supporting concurrency without shared memory. Reflection: I'd like to see something like that supported through a library defining the interface to extended type information. Persistence: I'd like to see some support in the Standard Library, probably in connection with the extended type information, but I don't currently have any concrete suggestions. Hash tables: Of course, some variant of the popular hash_map will be included. Constraints for template arguments: This can be simply, generally, and elegantly expressed in C++ as is. Assertions: Many of the most useful assertions [a means of code verification and error handling] can be expressed as templates. Some such should be added to the Standard Library. Regular expression matching: I'd like to see a pattern-matching library in the standard. Garbage collection: I'd like to see the C++ standard explicitly acknowledge that it is an acceptable implementation technique for C++, specifying that "concealed pointers" can be ignored and what happens to destructors for collected garbage. (See section C.4.1 of The C++ Programming Language for details.) GUI: It would be nice to have a standard GUI framework, but I don't see how that could be politically feasible. Platform-independent system facilities: I'd like to see the Standard Library provide a broader range of standard interfaces to common system resources (where available), such as directories and sockets. Note that these extensions are primarily additions to the Standard Library and that they can be implemented without adding runtime or space overheads. Thus, they can be added without violating the "zero overhead" principle. Among other things, C++ is a good language for hard-core embedded systems programming and should remain so. Also, all facilities should be properly integrated with current Standard Library facilities such as strings and containers. Except for the GUIs, I'm optimistic that it can all be done without undue controversy for the 2005 or so revision of the C++ standard. Of course, this is ambitious, but the alternative to ambitious goals is stagnation. I think the open source community has a major role to play in this, because none of these libraries are going to be accepted into the standard unless we have experience with quality implementations on which to base the standard. _______________________________________________ cpptips mailing list http://cpptips.hyperformix.com