Hacker News new | ask | show | jobs
by kjs3 3927 days ago
That's fair, and I don't, per se, disagree with any point.

That said, I will reiterate that it's clear that based on the several recent attempts, un-zombie-fying Modula-2 isn't trivial. Perhaps the answer is to grab one of these projects (or Modula-3) and throw the effort into "you're not going to be the next Webdev language, but lets beat this low-level systems niche into our world". Maybe start by writing a bulletproof bootloader or something. Or some security sensitive network plumbing. Can't do any worse than the Rust/Go guys are doing, with the bonus that Modula-[23] have actually been used to build real bare metal systems.

I dunno...maybe I just need another scotch.

FWIW...every time I've been in a "Forth could do this, but forth makes me want to dig my eyeballs out with spoons, what is the alternative?" scenario, I reached for C, and haven't really been all that disappointed. I know that makes me a bad person.

1 comments

Oh, I agree about work to revive a Modula-like language. Plus that it helps to do example projects that show why it's better. The CVSup author doing his tool in Modula made a nice, case study in Modula vs X discussions. One solution I thought of was just subsetting a language like Go or Pascal w/ runtime being limited or zero. Free Pascal still has good tool support plus was first Wirth language used in systems work. GEMSOS security kernel was also written in Pascal. You might also find BootSafe interesting: a certified compiler and checker from Java to Forth for increasing assurance/maintenance of Open Firmware components. Tool is quite proprietary but the approach could be used with Go, Pascal, etc if Forth is required.

So, there's some options on that. Far as Forth vs C, I think it's fine to think C is acceptable for firmware as being a near-cross-platform assembly suddenly helps there. I'd have made C default for this given all developers, tools, and code examples available. And then we'd have this discussion to figure out how to get rid of it.

On other hand, doing almost everything system in C then switching to Forth for just firmware? That's worse than doing everything in C. You're a better person for sparing the maintainers from that crap. ;)