3 ms·
# If it compiles, it runs # And when it runs, it’s very stable Modula-2 40 years ago. The ship had strong bones to build upon a long time ago, but alas, C. The
by jksmith 2y ago
# If it compiles, it runs
# And when it runs, it’s very stable
Modula-2 40 years ago. The ship had strong bones to build upon a long time ago, but alas, C. The tyranny of the masses.
- winrid 2y agoYou still worked with raw pointers in modula 2 though right?
- pjmlp 2y agoYes, they are available, however Modula-2 provides safer strings, arrays and reference parameters, no need for raw pointers for those use cases. In Modula-2, the equivalent to unsafe code blocks is IMPORT SYSTEM module. EDIT: For those that aren't aware, GCC finally got GNU Modula-2 as part of the official set of frontends and no longer a side project, bring up to four (D, Go, Ada, Modula-2), the set of safer languages out of the box on a full GCC install.
- myworkinisgood 2y agoNot tyranny of masses. C compilers became more popular because they could actually run in reasonable amount of time.
- pjmlp 2y agoMore like they were free beer compilers, on a free beer OS. On my piece of the world we were mostly using BASIC, Pascal dialects, Clipper, until Windows 3.x took over and make C relevant, alongside Petzold's book. And by then, many of us would rather use Borland compilers with Object Windows Library in C++ and Turbo Pascal, than deal with Win16 directly. Naturally on UNIX land it was another matter.
- oneshtein 2y agoPascal was fast, C was slow.
- hu3 2y agoPascal -> Oberon -> Go Languages that cared about compilation speed from the start. And it shows.
- flaie 2y agoThis is what I thought about OCaml when I first tried in 2001. I still do.
- zesterer 2y agoIt's no accident that Rust's bootstrap compiler was written in OCaml. Rust borrows a lot of ideas from it. Arguably, OCaml and ML are closer ancestors of the language than C. I like Rust, I use it as much as I can. But, it actually doesn't bring many new features to the table. What it's done is successfully learn from the past, scooping up the good ideas and ditching the bad ones. Its real selling point is how it wraps all of those old ideas up into a modern, well-maintained, stable package that's ready for use in the real world.
- satvikpendem 2y agoTo be fair, many languages have their bootstrapper written in OCaml or another similar ML. When I took my programming language interpreters and compilers classes, that's what they mentioned to us, because they are uniquely good at writing recursive descent parsers.
- pdimitar 2y ago> What it's done is successfully learn from the past, scooping up the good ideas and ditching the bad ones. Its real selling point is how it wraps all of those old ideas up into a modern, well-maintained, stable package that's ready for use in the real world. Which is no small feat. I wish OCaml cleaned house and settled on just one stdlib and removed a lot of legacy baggage, and oh yeah, add built-in Unicode support, and 5-6 other things I am forgetting now. Sure you can muscle through all that but having Rust around really makes you wonder if it's worth it and in my case I ultimately arrived at "nope, it is not" so I just use Elixir, Golang and Rust.