14 ms·
To be honest, if I'd make a language, I would make something like C++, break backward compatibility with C, but just much simpler and more beginner friendly. N
by jokoon 11y ago
To be honest, if I'd make a language, I would make something like C++, break backward compatibility with C, but just much simpler and more beginner friendly.
No templates, but standard maps, sets, arrays. Both compiled and interpreted. No virtual functions. Clean, simple syntax close to C, but with all the nicer stuff C++ brought along, like lambdas.
C++ is industrial-strong, but sometimes it seems it's not taught because it's too expert, in favor of java or C# while C/C++ is the language that should be taught.
I don't understand languages like rust and go which introduce a non trivial new syntax. Why not keep the C flavor ? I don't see how people are going to adopt languages like that. There should be a statically compiled language which has the same philosophy of python.
- pcwalton 11y ago> I don't understand languages like rust and go which introduce a non trivial new syntax. Why not keep the C flavor ? I don't see how people are going to adopt languages like that. There should be a statically compiled language which has the same philosophy of python. I don't understand what having "the same philosophy of Python" has to do with not keeping "the C flavor". The delta between Python's syntax and C's syntax is basically equal to the delta between Go's syntax and C's syntax, or Rust's syntax and C's syntax.
- jokoon 11y agoI was talking about 2 different things. What is good about C is its simplicity. Python is easy to learn too, and it has nice language facilities and syntax sugar. About the deltas, maybe you're right, but I disagree about the difficulty of the languages. For example go function prototypes seem pretty heavy to fully grasp and understand. Rust also have expert programming facilities and paradigms.
- sqeaky 11y agoWhat would you have for generic programming instead of templates? How would std::vector be implemented?
- jokoon 11y agoIt would be part of the language standard. Vector is part of STL.