+ 3

What is a good code language to make an operating system

5th Mar 2018, 8:24 PM
Edwin Chavez
Edwin Chavez - avatar
11 Respuestas
- 3
C++ is the best language for making an OS.
5th Mar 2018, 8:35 PM
Abhishek Kumar
Abhishek Kumar - avatar
+ 7
@Abhishek, that is a relatively biased response. There is no "good language" for making an operating system. Operating systems incorporate multiple languages, just like Windows, Linux, and Mac; they all use multiple languages.
5th Mar 2018, 8:51 PM
Dread
Dread - avatar
+ 7
UNIX and Windows NT are built upon Assembler and C. Not C++.
5th Mar 2018, 9:28 PM
Chris
Chris - avatar
+ 6
It is possible to write an operating system without any Assembly code in any language where the compiler generates binary. There are places that some Assembly code would help improve the speed, but most compilers generate binary better than a lot of people can. I've modified operating system source written in C, C++, and Modula II. I've written embedded systems in Pascal, C, and C++ (embedded is a subset of a real operating system lacking multi-user support and other things not required for the system.) Some of those had Assembly, but my last embedded C++ did not need any and could have become a multi-user operating system just by adding user accounts and privileges.
5th Mar 2018, 10:46 PM
John Wells
John Wells - avatar
+ 5
I agree with@Jonathan.. we use multiple languages for making Operating Systems like Windows and Linux. Not just C++ ! ..
5th Mar 2018, 9:03 PM
Aaron Stone
Aaron Stone - avatar
+ 3
Thanks
5th Mar 2018, 8:36 PM
Edwin Chavez
Edwin Chavez - avatar
+ 2
Thanks
5th Mar 2018, 9:04 PM
Edwin Chavez
Edwin Chavez - avatar
+ 2
To actually answer the question.. There are many good languages to use when building an operating system. Personally I find C/C++ most useful but for the deeper bits such as the kernel a little bit of assembly will be needed but most of it can be done in pretty much any programming language that compiles to machine code. After the lower components such as the bootloader and kernel the "user land" components such as general system utilities could even be written in an interpreted language if you wanted but it isn't recommended. So in my opinion a good choice of languages to use would be first: C++ because it is C just with some additions and changes so you get the best of both worlds and secondly: Assembly because it will be required in a few places and also because it can provide very low-level control in places such as the kernel and device drivers which is very helpful.
5th Mar 2018, 9:33 PM
Lewis
Lewis - avatar
+ 2
It NEEDS to be a fast language. Most operating systems are written mainly in C++, and Linux is written in C. Some knowledge of Assembly would also be very helpful.
5th Mar 2018, 9:48 PM
Jacob Pembleton
Jacob Pembleton - avatar
+ 2
For something like a kernel, C and some assembly would be used. For most of the operating system you would use C++ or Java in the case of Android (But please don't use Java).
6th Mar 2018, 12:49 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
- 7
plz upvote if you like my answer..
5th Mar 2018, 8:38 PM
Abhishek Kumar
Abhishek Kumar - avatar