2 ms·
C++-as-taught-by-schools, that's a good way to describe it. Now, for a complete beginner, as a first language it's actually not so bad (this was my intro to pr
by photochemsyn 5y ago
C++-as-taught-by-schools, that's a good way to describe it. Now, for a complete beginner, as a first language it's actually not so bad (this was my intro to programming) as long as you realize it's bad. The course structure is basically variables -> loops, conditionals -> arrays -> functions -> references & pointers -> dynamic memory allocation -> i/o files -> structs & classes -> encapsulation, polymorphism & inheritance. Maybe they'll introduce the STL vector, and maybe the smart pointer. After that, you're probably ready for algorithms and data structures: search and sort, stacks and queues and hashmaps and trees and graphs, all taught basically as 'C with classes', the justification being, you need to learn how these things are built under the hood (as if you're going to write C++ libraries for production, which you most likely aren't, but you should be aware, is their argument). Well, it's an education anyway.
Then (now you're about a year in), someone will tell you, you poor thing, you've been abused by being taught that way! Use modern C++ and the STL and never use a raw pointer again. Drop that OOP stuff, learn about lambdas and functional C++ instead. You then read flame war threads about the proper way to do things, which you finally learn to ignore as they're just people with inflated egos throwing things at each other online.
Finally you understand: people write firmware in C because it's about as low-level as you can get without going to assembly, and people write big projects and games in C++ because of all the libraries and the STL and good performance speed-wise, and then there are people who've abandoned C & C++ for Rust because of the memory leak issues and perhaps the convenient build system, and you never ever again write the kind of code you wrote for your assignments in your C++-as-taught-by-schools courses.
Finally, you take a few Python courses and marvel at how much easier it is to code in Python, but you feel a bit better off than those who learned to program in Python, because, you at least know what pointers are. Then someone tells you, hey, learn some Java too, it's easy to get a boring corporate job if you know Java. Anyway, that's what schools are teaching right now in their core intro CS curriculum, more or less.
- ModernMech 5y ago> Then someone tells you, hey, learn some Java too, it's easy to get a boring corporate job if you know Java. Anyway, that's what schools are teaching right now in their core intro CS curriculum, more or less. Your description accurate but a little off because most students at least in America learn Java first as part of their AP Computer Science course, and a lot of colleges use Java as an intro language for this very reason.