Hacker News new | ask | show | jobs
by narag 2561 days ago
Assembly was fun, but I understand it would be cruel and not so useful to teach it to today students, but I can't figure out how someone can learn some concepts whithout the "memory is an array" model.

My favourite book at college about (the real) data structures started building the array, even if it was already implemented in the language.

2 comments

I think learning some assembly is essential for any student that wants to use a low level programming language. It's a good way to learn not only about pointers but also the stack, registers, etc. I don't mean they need to be able to manually create a full program in assembly but doing simple exercises can be enlightening on their own.

Of course you also have to mention that even assembly is an abstraction. Memory isn't really a big array, cpus have caches and all that jazz. This matters when writing performant algorithms.

It is not necessary to go right down to assembly level to introduce these concepts, though. Just a language with a transparent memory storage model and explicit reference vs value distinction is enough. C is still the lingua franca of the programming world and IMHO it is useful to know basic C for these reasons even if you rarely write much code in it.