2 ms·
This is an interesting exercise, but most of the suggestions on the page are just cosmetic, and do not address the fundamental challenge of C++ - perhaps the bi
by pwang 12y ago
This is an interesting exercise, but most of the suggestions on the page are just cosmetic, and do not address the fundamental challenge of C++ - perhaps the biggest divergence between Python and C++:
A core design principle of C++ is that you do not pay (performance-wise) for what you don't use. This leads to all sorts of nasty things like object slicing, law of big 3, template preprocessor hell just to get pseudo-generics.
A core design principle of Python is that you should pay the minimum cognitive burden for what you are not using. Don't care to customize object dispatch? Then you don't need to know about descriptors and __slots__ just to write a simple class.
No amount of syntactic cargo culting is going to bridge this gap. The whitespace and lack of semicolons is not why people embrace Python. Just as removing integer types and sensible scoping from C++ won't make it Javascript, replacing braces with tabs is not going to make it Python.
- sanxiyn 12y agoThis is obviously not trying to address divergence between Python and C++. Stop attacking strawmen. Nobody sane would imagine C++ in Python syntax would appeal to Python programmers. On the other hand, C++ in Python syntax would appeal to C++ programmers who prefer Python syntax to C++ syntax. I am one of them, and this is a good try.
- 127 12y agoI disagree that greatly reducing the mental overhead of visual processing is merely a cosmetic change. This may just be an issue of taste, or familiarity, but I greatly prefer not presenting the same information twice. Once with characters and the second time with indentation. Why not just indentation? Also it forces people to make all hierarchical code blocks immediately visible, instead of being free to put them anywhere they like.