- What language is used to write operating systems (Windows)? [closed]
- 5 Answers 5
- What languages are Windows, Mac OS X and Linux written in?
- 14 Answers 14
- What language is .NET Framework written in?
- 5 Answers 5
- Programming language
- Types of programming languages
- List of computer programming languages
- Application and program development
- Artificial intelligence development
- Database development
- Game development
- Computer drivers or other hardware development
- Internet and web page development
- Script development
- How many programming languages are there?
- What are the top programming languages?
- Why Is C# Among The Most Popular Programming Languages in The World?
- What is C#?
- C# for Game Development
- C# is Easy to Learn — But Complex
- C# is an In-Demand Skill
- Learning C# With SoloLearn
What language is used to write operating systems (Windows)? [closed]
Want to improve this question? Update the question so it’s on-topic for Stack Overflow.
Closed 10 years ago .
What is the language used to write operating systems (Windows) or a boot CD?
5 Answers 5
Boot loaders are usually written in Assembly, as well as low-level kernel parts, like hardware drivers.
The kernel itself can be written in different languages, like Assembly, C or C++.
Maybe you want to look into the Singularity Project.
Its from Microsoft Reseach, on how today a OS could be built.
there you find a lot of papers, on the concepts of building an OS.
Operating Systems can be written in pretty much any language, and there are plenty of Operating Systems written in an whole bunch of languages. Just a couple of examples:
- Singularity is written in Sing# which is a superset of Spec#, which in turn is a superset of C#
- House is written in Haskell
- all of the Lisp OS’s are written in Lisp
- there are several Smalltalk OSs written in Smalltalk
- many embeddded OSs are written in Forth
- SharpOS and Cosmos are written in C#
- NewOS and JNode are written in Java
- Ununumium used to be written largely in Python, but now they have shifted their focus, it is written largely in assembly
- You can argue whether JS/UX is an OS or not, but it is written in JavaScript
- Modula-2 was explicitly invented for the purpose of writing an OS
- Oberon also was explicitly invented for OS development
- the original MacOS was written in Pascal
- the original OS/400 was written in Modula-2 and PL/MI
- Eleanor McHugh has some preliminary ideas for writing an OS in Ruby
- the Windows NT kernel is written largely in C, however the farther away you get from the kernel, there might be some C++ or even C# in there
I’m pretty sure the earliest versions of Windows were written primarily in Pascal. That’s why you can still find references to pascal calling conventions in old documents and header files, though AFAIK those conventions only ever applied to 16 bit Windows.
[EDIT — I’m now pretty sure I was told a while ago that this is wrong. Microsoft had reasons for using Pascal call conventions that I don’t remember, but didn’t use Pascal for coding Windows (or the majority of it or whatever)].
These days, Windows is probably written in a mixture of languages, though with the emphasis strongly on C and C++. For example, some parts of .NET are probably written in C#, and these days that easily counts as an O/S component.
Similarly, I’ll bet there are at least a few Objective C components in modern versions of the Mac O/S.
There are a lot of languages that are somewhat suited to writing operating systems. In niche areas, I’m certain you’ll find Ada, Modula 2 and more.
Imperative languages without garbage collection are probably most common because of the relative ease of interfacing to hardware and assembler code. However, most functional languages are impure. There are low-level versions of Lisp around, if you look hard enough. And ML-family languages and Haskell have probably been used in operating systems, at least for research/academic purposes.
In fact, I wouldn’t be surprised to find even a bit of Prolog in some operating systems components — and certainly some code written using custom-made domain specific languages.
What languages are Windows, Mac OS X and Linux written in?
I was just wondering who knows what programming languages Windows, Mac OS X and Linux are made up from and what languages are used for each part of the OS (ie: Kernel, plug-in architecture, GUI components, etc).
I assume that there are multiple languages for each and obviously I know the Linux kernel is written in C.
I’m totally guessing here that Mac OS X contains a lot of Objective-C code as it is Apple’s language derived from NeXT.
Windows, I have heard contains C, C++ and Intel Assembly. Do Linux or Mac OS contain any Assembly code?
Also, are there scripting languages like Ruby, Python, etc used by the OS developers for scripting parts of the OS? What parts of the OS would be written in each language?
14 Answers 14
- Windows: C++, kernel is in C
- Mac: Objective C, kernel is in C (IO PnP subsystem is Embedded C++)
- Linux: Most things are in C, many userland apps are in Python, KDE is all C++
All kernels will use some assembly code as well.
Linux: C. Some parts in assembly.
[. ] It’s mostly in C, but most people wouldn’t call what I write C. It uses every conceivable feature of the 386 I could find, as it was also a project to teach me about the 386. As already mentioned, it uses a MMU, for both paging (not to disk yet) and segmentation. It’s the segmentation that makes it REALLY 386 dependent (every task has a 64Mb segment for code & data — max 64 tasks in 4Gb. Anybody who needs more than 64Mb/task — tough cookies). [. ] Some of my «C»-files (specifically mm.c) are almost as much assembler as C. [. ] Unlike minix, I also happen to LIKE interrupts, so interrupts are handled without trying to hide the reason behind them. (Source)
Mac OS X: Cocoa mostly in Objective-C. Kernel written in C, some parts in assembly.
Mac OS X, at the kernel layer, is mostly an older, free operating system called BSD (specifically, it’s Darwin, a sort of hybrid of BSD, Mach, and a few other things). almost entirely C, with a bit of assembler thrown in. (Source)
Much of Cocoa is implemented in Objective-C, an object-oriented language that is compiled to run at incredible speed, yet employes a truly dynamic runtime making it uniquely flexible. Because Objective-C is a superset of C, it is easy to mix C and even C++ into your Cocoa applications. (Source)
Windows: C, C++, C#. Some parts in assembler.
We use almost entirely C, C++, and C# for Windows. Some areas of code are hand tuned/hand written assembly. (Source)
What language is .NET Framework written in?
The question I always wanted to ask and was afraid to, actually — what language is .NET Framework written in? I mean library itself.
It seems to me that it was C and C++ mostly. (I hope Jon Skeet is reading this one, it`ll be very interesting to hear what he thinks about it)
5 Answers 5
The CLI/CLR is written in C/C++ and assembly. Almost all of the .NET framework classes are written in C# > compiled to IL, which runs in the CLR. If you crack open a framework library in Reflector, class, you may see an attribute such as [MethodImpl(MethodImplOptions.InternalCall)] which delegates the call to the CLI.
.NET was fully written in C and C++ because the base was in assembly language. Integration of assembly with C is much easier compared to newer languages.
Microsoft .NET Framework is divided in to many segments.
CLR: C++
IO/Signal Processing: Assembly
Baseclass Library: C#
System.Threading: C#
Complex Data Structure: C++
Example: GetHashCode
There are parts of the .NET Framework that are open-source, like ASP.NET MVC, and it’s written in C#.
Since the .NET Framework represents many assemblies, I’d presume that different libraries are written in different languages. As long as the language is CLR-compliant, it can be used to build parts of the framework.
All said, though; I’d assume the lion’s share of the .NET Framework is written in C++ and C#.
CLR / Compilers — Visual C++
Baseclass Library — Simple Managed C (SMC)
Programming language
A programming language is a computer language programmers use to develop software programs, scripts, or other sets of instructions for computers to execute.
Although many languages share similarities, each has its own syntax. Once a programmer learns the languages rules, syntax, and structure, they write the source code in a text editor or IDE. Then, the programmer often compiles the code into machine language that can be understood by the computer. Scripting languages, which do not require a compiler, use an interpreter to execute the script.
Types of programming languages
Each of the different programming languages mentioned in the next section can be broken into one or more of the following types (paradigms) of languages.
There are other paradigms that can classify a programming language. We’ve tried to list only the most common as a starting point.
A language can also be broken into one of five generation languages.
List of computer programming languages
Today, there are hundreds of different programming languages. The following section contains an index of the different programming and scripting languages currently listed on our site. Clicking any of the following languages displays an explanation and examples of that language.
A-C | D-K | L-Q | R-Z |
---|---|---|---|
ActionScript ALGOL Ada AIML * Altair BASIC Assembly AutoHotkey Babel BASIC Batch file BCPL BeanShell Brooks C C# C++ CL Clojure COBOL CoffeeScript Common Lisp CPL CSS * Curl Curry | D DarkBASIC Dart Datalog dBASE Dylan EuLisp Elixir F F# FORTRAN FoxPro Franz Lisp GameMaker Go GW Basic Haskell HDML * HTML * InterLisp ksh Java JavaScript JCL Julia Kotlin | LeLisp Lisp LiveScript LOGO Lua MACLISP Matlab Metro MUMPS Nim Objective-C OCaml Pascal Perl PHP Pick PureBasic Python Prolog QBasic | R Racket Reia RPG Ruby Rust Scala Scheme Scratch SGML * Simula Smalltalk SPL SQL * Stanford LISP Swift Tcl Turbo Pascal True BASIC VHDL Visual Basic Visual FoxPro WML * WHTML * XLISP XML * YAML * ZetaLisp |
Languages marked with an asterisk (*) in the list above are not technically a programming language. They are markup, style sheet, and database management languages that are included in the list for those who may consider them as a programming language.
Those new to computer programming may find the list above overwhelming. Figuring out where to start depends on the type of computer programming you want to do. The next section lists different fields of programming, and the languages to consider for each.
There are several programming languages listed above that may not be in the following categories. The reason for this is that we have elected to list only the most popular choices to avoid confusion.
Application and program development
Application and program development involves programs you work with on a daily basis. For example, the Internet browser you are using to view this web page is considered a program. If you are interested in developing a program, consider the following languages:
Artificial intelligence development
Artificial intelligence or related fields involve creating the character interactions in computer games, portions of programs that make decisions, chatbots, and more. If you’re interested in developing an AI, consider the following languages:
Database development
Database developers create and maintain databases. If you’re interested in creating or maintaining a database, consider any of the following languages:
Game development
Game development involves creating computer games or other entertainment software. If you’re interested in developing a game, consider the following languages:
Computer drivers or other hardware development
Computer drivers and programming hardware interface support are a necessity for hardware functionality. If you’re interested in developing drivers or software interfaces for hardware devices, consider the following languages:
Internet and web page development
Internet and web page development are the essence of the Internet. Without developers, the Internet would not exist. If you’re interested in creating web pages, Internet applications, or other Internet-related tasks, consider the following languages:
Script development
Although it is not likely to become a career, knowing how to create and develop scripts can increase productivity for you or your company, saving you countless hours. If you’re interested in developing scripts, consider the following languages:
How many programming languages are there?
As computers have evolved, many different computer programming languages created for various types of development. Although we do have several dozen languages listed on our site, there are hundreds that we don’t have listed. To get an idea of the different programming languages, you can visit The Hello World Collection, which gives a demo of how to write «Hello World» in over 591 different programming languages.
What are the top programming languages?
There are many different ways this question could be answered. However, we feel that the best method is to rely on the data from GitHub, a service that hosts over 96 million different software projects. In the below chart, GitHub shows the top 10 programming languages from 2014 to 2018.
In the chart above, you can see the top 10 languages are: JavaScript, Java, Python, PHP, C++, C#, TypeScript, Shell, C, and Ruby. The complete overview of growing languages list is on the GitHub Octoverse page.
If you’re learning to program, we recommend learning the language that will suit your needs or that others in your industry rather than the most popular language.
Why Is C# Among The Most Popular Programming Languages in The World?
C# is a modern object-oriented programming language developed in 2000 by Anders Hejlsberg at Microsoft as a rival to Java (which it is quite similar to). It was created because Sun, (later bought by Oracle) did not want Microsoft to make changes to Java, so Microsoft chose to create their own language instead. C# has grown quickly since it was first created, with extensive support from Microsoft helping it to gain a large following; it is now one of the most popular programming languages in the world.
What is C#?
It is a general-purpose language designed for developing apps on the Microsoft platform and requires the .NET framework on Windows to work. C# is often thought of as a hybrid that takes the best of C and C++ to create a truly modernized language. Although the .NET framework supports several other coding languages, C# has quickly become one of the most popular.
C# can be used to create almost anything but is particularly strong at building Windows desktop applications and games. C# can also be used to develop web applications and has become increasingly popular for mobile development too. Cross-platform tools such as Xamarin allow apps written in C# to be used on almost any mobile device.
C# for Game Development
C# is widely-used to create games using the Unity game engine, which is the most popular game engine today. More than a third of top games are made with Unity, and there are approximately 770 million active users of games created using the Unity engine. Unity is also used for VR, with 90% of all Samsung Gear and 53% of all Oculus Rift VR games developed using Unity.
C# is a very popular tool for creating these applications, and so makes a great choice for any programmer hoping to break into the game development industry, or for anyone interested in virtual reality.
C# is Easy to Learn — But Complex
C# has many features that make it easy to learn. It’s a high-level language, relatively easy to read, with many of the most complex tasks abstracted away, so the programmer doesn’t have to worry about them. Memory management, for example, is removed from the user’s responsibility and handled by .NET’s garbage collection scheme.
It’s also a statically-typed language, so the code is checked before it is turned into an application. This makes it easier to find errors, something which can be particularly useful for beginners.
Although C#’s syntax is more consistent and logical than C++, there’s still plenty to learn. C# is a complex language, and mastering it may take more time than simpler languages such as Python. This means users do need to learn a substantial amount of code to create advanced programs, which may be off-putting for some new users.
C# is an In-Demand Skill
Being powerful, flexible, and well-supported has meant C# has quickly become one of the most popular programming languages available. Today, it is the 4th most popular programming language, with approximately 31% of all developers using it regularly. It is also the 3rd largest community on StackOverflow (which was built using C#) with more than 1.1 million topics.
This popularity translates into a thriving job market — more than 17,000 C# jobs are advertised each month (globally) with an average salary of more than $72,000. Narrowing down to the US only, there are more than 6,000 jobs advertised each month with an annual salary of $92,000.
Learning C# With SoloLearn
The SoloLearn app and community is a great way to start learning C#. Regardless of whether you want to join a AAA game development company, or just learn to create a few programs for fun, C# is a great first language.
The SoloLearn course will teach you the basics through 69 lessons across nine different modules. Each lesson contains several quizzes (199 in total) to help you cement your learning through practice. The modules include:
· Module 1: Basic Concepts
· Module 2: Conditionals and Loops
· Module 3: Methods
· Module 4: Classes and Objects
· Module 5: Arrays & Strings
· Module 6: More On Classes
· Module 7: Inheritance & Polymorphism
· Module 8: Structs, Enums, Exceptions & Files
· Module 9: Generics
Don’t worry if those module titles don’t mean too much to you yet, by the end of the course you’ll be well on your way to becoming a fully-fledged C# developer. When you join SoloLearn, you also get the benefit of joining a huge community of passionate learners who support and help each other. So, what are you waiting for?
…and before you go
Did you find this article helpful? Share the article so your coding friends can benefit from it too.