Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Considering it's replacing C++ as the starter language at many universities this may not be true for too much longer as younger developers get more exposure to Python.


Hooking onto that, is there any reason to use C++ as a programming language in non-technical university courses?

Someone I know does a math and economy study and they use some programming to find optimal solutions for certain problems (e.g. traveling salesman). They are taught C++ with pointers and by-reference parameters and OOP and everything in a 7 week course. Why not Python with some functions? That perfectly suits their purposes and makes life a lot easier both for the teacher (less code to check; clearer code) and the student (easier to learn; less code to write).


I'd probably go for C or C++ if you're teaching data structures. It can be helpful when pointers and memory layout are right there in front of you, and not obscured by the language.

For other computer science topics, probably not.


> I'd probably go for C or C++ if you're teaching data structures.

Hmm perhaps if you are interested in the technical working of a data structure, but even if you use Python you'll have to mind your memory and CPU usage. They have to implement things like the traveling salesman problem and get the correct answer to a reasonable number of cities.

Python is slower than machine code by definition, but not so much that it becomes much harder to do the same calculation. They have to think of speed regardless of the language, and doing that is much easier when you pass around lists instead of pointers to pointers of doubles (double * *, added spaces to avoid markdown).




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: