3 ms·
C has got macros, so it can be very hard to read too. Generators (http://docs.python.org/tutorial/classes.html#generators http://docs.python.org/tutorial/class
by shin_lao 16y ago
C has got macros, so it can be very hard to read too.
Generators (http://docs.python.org/tutorial/classes.html#generators http://docs.python.org/tutorial/classes.html#generators) in Python can make code very hard to read as well in "hiding" a lot of complexity inside the generation.
In other words, such code:
r = f(param)
can be a lot of different things as well.
The enter/exit clauses hide a lot of code as well, although they should be used for (de)initialization they can be abused (I've seen it).
Finally, I think you should elaborate more when you say "for what the STL accomplishes, I'd rather just use OCaml" because I don't understand what it means and I know both languages (C++ much better, admittedly).
- silentbicycle 16y agoI mentioned C macros already, and I don't think Python generators are a good example - used idiomatically, they usually made code easier to read, and Python's community imposes a fairly consistent style. About OCaml - I much prefer its way of doing parametric data structures, functors, etc.
- ramy_d 16y agoso your argument is: my programming language's concepts make it easier to read as long as you use them correctly, and all of MY friends write the same way anyway so our language is SUPER easy to read. breaking news: it's not. the problem with your argument is you're not c++ programmer, and you saw this post on hacker news and decided to come here tell us how much better whatever language you use is to C++. you don't seem to consider that this language is the way it is for very specific reasons. I'm trying to say that this article is VERY poorly written with very biased opinions and refuses to look at the language as whole. I'm not saying C++ is the EASIEST language to read, it's not. And his examples could have passed off as hard to read for ANY LANGAUGE. honestly? bar = foo(bla); like who the fuck writes like that anyway? Readability is the trade off the C++ standards committee will always make because readability will come in the way of the things most important to the language (C compatibility, speed, high level functionality) but that doesn't mean you get to take a dump on your keyboard and click the send button. if you don't understand the issues at stake then don't release you diatribe into the conversation. C++ isn't python, or C or Ruby nor is it supposed to be. just accept it.