Hacker News new | ask | show | jobs
by pjmlp 4631 days ago
> Modern operating systems have traditionally been written in C (and C++) plus some assembly language code. D can do everything C & C++ can do but it would still no doubt need the assembly language code.

Actually, contrary to C and C++ language specification, in D, support for inline assembly is part of the language specification.

> downvote

sambeau 50 minutes ago | link | parent | flag

I fear you are confusing systems programming language and operating systems programming language (or conflating).

Go is a great systems programming language especially for modern concurrent systems — http servers etc. It talks to C easily so you can integrate all kinds of system level code into your apps. Having a Garbage collector makes it trivial to write long-running daemons.

Modern operating systems have traditionally been written in C (and C++) plus some assembly language code. D can do everything C & C++ can do but it would still no doubt need the assembly language code.

Go lacks manual memory management. Some say that this would be a barrier for writing an operating system while others don't. The fact that you would have to use some assembly language code to talk to the hardware and you might need to add some manual memory management via assembly language code. After that I'm sure the garbage collector would make the OS more reliable and potentially a little quicker in places.

While I am on the D and Rust field, I support Go's ability to do this.

Go is no different from Oberon in system capabilities. And Oberon was used to write quite a few desktop systems used at Zurich's ETHZ during the mid to late 90's.

The OS bootloader and the kernel package for hardware interactions were written in Assembly, with the remaing parts in Oberon.

You can read all about it here, http://www.inf.ethz.ch/personal/wirth/books/ProjectOberon.pd...

> Either way I don't see why Go gets criticised for needing a bootstrap layer when operating systems written in C and C++ also need this.

Because many tend to assume compiler extensions to C and C++ are part of the language.

It is a fun quiz asking C and C++ developers what is part of the standard and what is compiler specific behaviour.