Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Low-level programming besides C and Rust
2 points by ansible on July 17, 2018 | hide | past | favorite | 6 comments
I've been thinking about porting / rewriting a Minix-like operating system to a new CPU.

I've been programming in C (and to a lesser extent C++) for a long time, so there's always that.

I've looked briefly at Rust here and there. I have previously tried to wrap my brain around Haskell, with limited success, and never really got comfortable with it. It seems like really grokking Rust will be a similar effort.

Is there anything else in the low-level embedded space that might be suitable?

I'm mostly concerned about simplicity and safety. I'm willing to trade some verbosity for tight and efficient generated code.

Edit: I also also add I'm thinking I should stay away from garbage-collected languages, since this is intended for low level operating system development. I don't know if adding in real-time requirements is a good idea, but I wouldn't want to close off that possibility either.




I had previously looked at D a while back, before I was thinking about this project. It did seem an improvement upon C, but not enough of one to make it worth the switch. Also, for this project, I'm looking for something without garbage collection.

I hadn't really looked closely at Nim before, but it is garbage-collected too, so I don't think that's going to work.


You can use Nim without a garbage collector. I've seen it running on plenty of micro-controllers in this way.


> You can use Nim without a garbage collector. I've seen it running on plenty of micro-controllers in this way.

That's interesting.

Nim compiles to C, so it doesn't look like it would require much in the way of porting. I'll take a closer look at that too.


Ada?


Probably not Ada itself, but I'll a little more closely into SPARK, which is based on a subset of Ada and is intended for high assurance applications.

https://en.wikipedia.org/wiki/SPARK_(programming_language)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: