4 ms·
Props to python. However, what idea has C++ not accepted? It seems for it to be a "new" language, it should at least say "no" to something.
by wglb 11y ago
Props to python.
However, what idea has C++ not accepted? It seems for it to be a "new" language, it should at least say "no" to something.
- smcameron 11y agoC++ says "no" to readability. Everything that has been added to C to create C++ was added in order to help out the person writing new code. Nothing that was added to C to make C++ is there to help the person trying to read the code. Though I doubt it was deliberate, much of what makes C++ different than C seems actively hostile to the person trying to read the code.
- jordigh 11y agoYou really find auto x = new int[64]; harder to read than int* x = malloc(sizeof(int)*64); ? If so, I think it's just a matter of habituation and imprinting. Whatever you learned first is easier and everything else is hard.
- smitherfield 11y agoBoth C and C++ have readability issues. ((void(*)())exec)(); or template <typename T> struct value_type { typedef typename T::value_type type; }; template <typename T> struct value_type<T*> { typedef T type; }; Six of one, half a dozen of the other.
- emmelaich 11y agoI think there's a gap that could be filled by making a nice front-end to C++ with nicer simpler (even Pythonic) syntax. Drop the semi-colons, convert "dict of int to string' to map<int, std:string> etc. It would be ok if it only did a subset of C++ at first.
- dmytrish 11y agoSounds like http://nim-lang.org/ http://nim-lang.org/ . Just simplifying syntax is not a great idea for a system programming language though.
- Tyr42 11y agoIt doesn't have yield. It also doesn't have Concepts yet, as they got pushed back again.
- marvy 11y agoThey're working on Concepts, and they're working on yield (search for resumable functions). Maybe they can say "no" to "saying no"? :)