-4

I want to start a small project about writing a new mini OS. There are a lot of new fancy languages nowadays gaining popularity for their safeness and almost c or c++ like performance. Which would be a good fit to write an OS with minimal or no drawbacks. I can imagine writing in a new language would drastically save lines of code, spare complexity and so on. What about other possible advantages?

I can think of

  • Rust
  • D
  • Go
  • Red
  • Dart (maybe)

and others

Do you know of any similar projects i might even join in? I know the answers are opinionated, but that's what im asking for. Opinions on why one language might be a better fit than the other.

alknows
  • 1,972
  • 3
  • 22
  • 26

1 Answers1

2

Of the alternative languages you listed, Rust and D are most likely the best choices. Except that Rust is still pre-1.0, and so you are pretty much guaranteed the language will have breaking changes before you finish. If you're looking to use Rust it may be better to wait until the language stabilizes at 1.0 (which is supposed to happen before the end of the year), and then start your project.

AndrewBrinker
  • 71
  • 1
  • 7
  • 2
    @Aldi, I would also read [this](http://jvns.ca/blog/2014/03/12/the-rust-os-story/) for further amusement about writing a toy OS in Rust. – kostix Nov 15 '14 at 16:06
  • 1
    Interestingly (and this goes with the comment on breaking changes), some of the syntax in that post is now invalid Rust code. For example, owned pointers are done via `box 1234` rather than `~1234`. – AndrewBrinker Nov 15 '14 at 16:08
  • That's one of the chief reasons that while I'm keeping an eye on the Rust's progress, I use Go for suitable production mini projects: the language should have an API stability promises (like [Go does](https://golang.org/doc/go1compat), for instance) to be interesting for anything beyond toy weekend projects. I hope Rust devs will provide the same promise for the 1.x series along with the 1.0 release. – kostix Nov 15 '14 at 16:33
  • 1
    Thanks @kostix through that link i found out that there is a kernel written in Rust. https://github.com/charliesome/rustboot – alknows Nov 15 '14 at 16:35
  • Some advantages: memory safety, less error prone, and better support for parallelism, leading to better security and less debugging. – Jerry101 Nov 16 '14 at 07:39
  • I also read that the [RED programming language](http://www.red-lang.org/) is supposed to be one of these general purpose programming languages which goes from hardware and drivers up to scripting and user applications. It also hasn't reached version 1. – alknows Nov 16 '14 at 11:30