3 ms·
But nowadays, why would anyone use Modula-2 today and not Rust, C++, Go, or basically any other programming language?
by trealira 2y ago
But nowadays, why would anyone use Modula-2 today and not Rust, C++, Go, or basically any other programming language?
- phicoh 2y agoAs an undergraduate I had to use Modula-2 in the first year programming courses. It was a decent language for teaching programming, but I don't recall anybody who liked it. Those in systems programming quickly switched to C the next year. It may still be useful for teaching. Low level enough that you can teach memory allocation, etc. Simple enough that you can cover most of the syntax in an introduction course.
- trealira 2y agoThat's fair. I taught myself to program using C, and C's conflation of pointer parameters with arrays, and its declaration syntax, confused me at first. And I also ended up with more unexplained glitches segfaults in the beginning due to arrays not being bounds checked. It might have been easier to start with something like Modula-2 in the beginning.
- pjmlp 2y agoGiven that Zig is basically Modula-2 features packaged in C like syntax + compile time execution, or languages like Odin do exist, there is still a group that finds such kind of languages interesting. So then do we reuse code that was been scattered around since 1978 and give it new life, or start from zero, yet another language for systems programming with manual memory management, while being safer than C? Kind of philosophical question.