4 ms·
If I were to extend C by adding python style classes on top of it, I would end up with roughly the same number of keywords. I don't think it's true that C++ has
by markessien 17y ago
If I were to extend C by adding python style classes on top of it, I would end up with roughly the same number of keywords. I don't think it's true that C++ has a lot of new concepts in the language itself.
I agree that C++ is very library oriented, and it changes your approach to the language, but this is not a fault of the language itself, this is a side-effect of its very wide popularity.
If you have a pattern used by a library, then that is the fault of the library, but not a fault of the language. The language does not come with any patterns.
Templates in C++ are not good, but they are not widely used in the real world. Most people ignore them, and that's good so.
- mahmud 17y agoTemplates in C++ are not good, but they are not widely used in the real world. Depends on where your "real world" is. C++ usages are vendor and library dependent. My C++ code looked different in MFC/COM/ATL than in FLTK and that too was different than Qt. Choosing the right C++ becomes a matter of choosing the right vendor, and if that choice isn't up to you, well, tough luck.
- kristiandupont 17y ago"Templates are not used"? Do you mean that you code C++ without the standard library?
- markessien 17y agoThe STL is optional. Templates are widely used in container formats, but in real world programming, for example when people model shopping carts or so, most of the code out there does not use templates. Let's get real here and look at a code repository like codeproject or codeguru - those sites hold diverse examples of real world code - and template usage is minimal.
- stcredzero 17y agoIf I were to extend C by adding python style classes on top of it, I would end up with roughly the same number of keywords. You can use Objective-C as a datapoint here. That's Smalltalk on top of C. You can use the same sort of trick (delimiting the dynamic sends) to recycle the C keywords in the dynamic context, and end up with a language with just a few more keywords than C.