by meatbundragon · 8y ago · 0 comments
In my experience, the best course of action is to learn whatever you need first.
For those considering programming as a hobby/occupation, being told to learn a relatively complex and unpractical language would raise the bar of entry.
you can write a C compiler in just a few thousand lines.
You can spend weeks segfaulting in C before you get things actually working, and for a beginner — especially self-teaching/unsupervised — it's extremely easy to rely on compiler-specific behaviour in the face of UBs.
When learning, if the only choice were C or assembly I'd actually recommend assembly.
This seems like an overstatement. The first programming class I ever took was "Introduction to Programming with C" where the textbook was K&R and we were writing and compiling programs from day one.
If you can't figure out how to manage memory (one dimensional data structure) in C jumping into a language that immediately allows you to abstractly manipulate complex multi-dimensional data structures will certainly not make your life easier.
If I show someone a list of lists in C# the semantics of that will be very easy for them to grasp. The same data structure in C might defeat them altogether.
Lisp is still the best language to learn, but any proper scripting language will do also.
PS: "proper scripting language" of course excludes PHP and JavaScript. Dart is fine.
I understand the point that C is not the best choice this days to do big projects but for learning it seems a good idea, even to learn what segfaults are and buffer overflows are.
"Okay, now this is how you float on your back; but watch your head: there a protrusion of iron rebar sticking out of a broken concrete bridge support, and you're heading straight for it! We call that 'uncomfortable behavior'."