Hacker News new | ask | show | jobs
by jcelerier 2270 days ago
> I just think it's silly to try to pretend to be more expressive than scripting languages.

So far we have a Python, a Rust and a C++ program in this thread which output the same thing given the same input, which, by the definition of expressive power of programming languages means that they are exactly as expressive as each other (given this information only and notwithstanding small differences such as error handling in this case).

Also you mentioned in your original thread :

> Even if the syntaxes were exactly the same (which they are not, python syntax is on average shorter)

indeed

> the low level nature of C++ requires your code to do operations that Python does need to do, such as memory management.

Notice that there is nothing which looks like memory management in my code. There are entire classes of programs that can be written without thinking about when to allocate or free your memory at all - just declare your variables on the stack and with std types, and that is handled for you (and that's not a modern C++ thing ! it's been like that since the very beginning). Opting in to memory management is an active, conscious effort in these cases (or a residue of people who only were taught java / c# at school and sprinkle their code with `new`).