Is it worthwhile to teach assembly nowadays? In the 80s, it was common for CS students (and anyone wanting to do "real" programming) to learn assembly. After all, if you needed speed, hardware access (including direct output to monitor) or working on low powered hardware, you needed Assembly.

But nowadays, in 2018, assembly is pretty much useless except to bootstrap an OS or for compilers (and even that isn't as important as it used to be since LLVM took off).

So is there still a use in programming Assembly?
I think so, yes. However, I also believe teaching assembly isn't valuable because it could hypothetically teach students how to write "faster programs" -- compilers these days are smart enough that most of the time, you're just better off using a systems language and relying on the compiler if you're interested in that.

Rather, I believe the value in teaching assembly (and systems in general) is it gives the students a much deeper understanding of how computers work, which is highly valuable if they want to move on to other subfields of computer science.

For example, suppose a student is interested in exploring security. If they want to learn how things like buffer overflows work, what ASLR is, be able to understand the latest innovations in kernel research, how whatever the vulnerability-of-the-day works (right now, it seems to be Spectre and Meltdown), it's essential they have a good understanding of how exactly their computer, the hardware, the OS ticks.

Teaching assembly (and more importantly, things like calling conventions, the stack vs the heap, and so forth) is a pretty decent stepping stone to help prepare students travel down this path. Of course, I'm not claiming teaching assembly is the only way, but it's certainly a well-trodden and popular route.

We can do the same kind of analysis for other fields -- systems knowledge is potentially valuable for people interested in compilers/PL research, in software validation and correctness analysis research, for people who want to build on top of new tools like Webassembly, for people who are interested in writing hardware accelerated code (using GPUs, FPGAs, SIMD instructions, etc)...

Of course, not everybody is going to be interested in these fields, and even if they are, that doesn't necessarily mean that assembly is going to be directly useful or relevant to them.

But I don't think that's any excuse not to teach the material -- the goal of teaching, I believe, is to prepare students to be successful in a wide variety of different fields, whether that's industry, research, or something else. And if that means sometimes teaching them material that they won't directly need for the foreseeable future, I think that's fine. It's better to be over-prepared then under-prepared, yeah?



tl;dr: having systems knowledge is useful. And if you're going to teach systems, I would imagine that you're basically obligated to teach at least some assembly.