this post was submitted on 26 Feb 2024
47 points (91.2% liked)
Linux Gaming
15825 readers
68 users here now
Gaming on the GNU/Linux operating system.
Recommended news sources:
Related chat:
Related Communities:
Please be nice to other members. Anyone not being nice will be banned. Keep it fun, respectful and just be awesome to each other.
founded 4 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I strongly disagree.
If you want someone to learn how programming works mechanically, recommend C. It's a very simple abstraction over the hardware, unlike C++ which comes with a ton of complexity that's completely unrelated to the task of learning how programming works. There's way too much magic with things like templates, operator overloading, etc that gets in the way. In fact, I recommend learning C on very simple hardware, like an Arduino, where you don't have any of the nonsense associated with operating systems, like system-specific nuances in file handling and whatnot.
That said, I'll always recommend Python first to new programmers. It has relatively little magic while abstracting away most of the annoyances and footguns that you'll get in lower-level languages like C. Once the user is comfortable using Python to get things done and is interested in learning more, I'd throw them in the deep end and recommend Rust, which forces you to contend with things programmers are expected to understand (but can easily get away with not understanding) in C/C++, such as ownership and lifetimes. Python is the "get stuff done" language, and Rust is "theoretical CS in practice." If they really like Rust, I'll steer them toward functional languages like Haskell which go even harder on the CS theory. Or if they want something a bit more "mainstream" than Rust (e.g. they want to make games), going for C++ makes a lot of sense, and they'd probably write better C++ because they've learned the strategies and terminology from Rust.