Same here.justincase wrote: ↑Thu Mar 14, 2019 10:58 pm Well, I thought SOOAHPAZ was real at first, but he/she/it is seeming more and more like a bot to me.
Language C
Moderator: Moderator Team
- binarymaster
- Posts: 481
- Joined: Sun Nov 16, 2014 7:05 pm
- Location: Russia, Moscow
- Contact:
Re: Language C
by Stas'M | https://github.com/binarymaster
- EmuandCo
- Developer
- Posts: 4731
- Joined: Sun Nov 28, 2004 7:52 pm
- Location: Germany, Bavaria, Steinfeld
- Contact:
Re: Language C
Ok.... I sit in a train here, a German train aka 3rd world internet available on my way to Chemnitz, and all I see in here is kindergarten?! Back to topic and please stop attacking ppl because of their language. If you don't understand it at all, you can ask, but otherwise reply or do NOT reply. Thanks for your attention!
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.
If my post/reply offends or insults you, be sure that you know what sarcasm is...
If my post/reply offends or insults you, be sure that you know what sarcasm is...
-
- Posts: 1790
- Joined: Fri Aug 07, 2009 5:11 am
- Location: USA
Re: Language C
Back to the original question, it is written mostly in C, with some things like parts of the shell that work with com objects written in C++, and parts of the kernel written in assembly.
-
- Posts: 441
- Joined: Sat Nov 15, 2008 4:13 pm
Re: Language C
And basically, the parts written in Assembly are manually optimized to run fast on one platform, the C parts are in C because it's fairly close to Assembly in speed while also being more portable, allowing it to be compiled for different architectures, and the C++ parts are in C++ because they use some of features that aren't available in C to make the source notably easier to write and read the code when doing certain things (like working with COM objects, as PurpleGurl says).
I reserve the right to ignore any portion of any post if I deem it not constructive or likely to cause the discussion to degenerate.
-
- Posts: 1790
- Joined: Fri Aug 07, 2009 5:11 am
- Location: USA
Re: Language C
Well, the assembly in the kernel is to be not just efficient, but exact, as you are dealing with specific locations, and sometimes you cannot leave it to chance which opcodes are used. C would take more fiddling, but can be done (or use some inline assembly with it). Portability is not an option when working this intimately with the hardware with a specific architecture. To be more portable, you'd need programming directives and multiple compiler/linker pathways, and selecting during build which one you want.
And while COM objects can be done in C as David originally proved, where he had to make custom macros and similar, he eventually went to C++ as that seemed more sane and easier to follow.
And while COM objects can be done in C as David originally proved, where he had to make custom macros and similar, he eventually went to C++ as that seemed more sane and easier to follow.
Re: Language C
on topic, I wonder if ReactOS code could be ported to FreePascal
-
- Posts: 215
- Joined: Wed Feb 21, 2018 3:46 pm
- Location: Somewhere in France
Re: Language C
Not like bot, because he/she answers like a human being, but maybe is a spammer (it's not incompatible).justincase wrote: ↑Thu Mar 14, 2019 10:58 pm Well, I thought SOOAHPAZ was real at first, but he/she/it is seeming more and more like a bot to me.
Re: Language C
hi
a bit off topic but I wonder if you where to make a new os what parts can be written using programming languages like Java or VB.net or c# and what parts you need to write using c/c++
a bit off topic but I wonder if you where to make a new os what parts can be written using programming languages like Java or VB.net or c# and what parts you need to write using c/c++
-
- Posts: 1790
- Joined: Fri Aug 07, 2009 5:11 am
- Location: USA
Re: Language C
Generally, your lower level languages are needed for the kernel, but all the stuff you mentioned could be acceptable for user mode stuff, particularly end user apps.
Re: Language C
There are operating systems written in C# and probably Java... it's just a question of how much effort you want to put into the toolchain and execution environment.
There are at least three aproaches I can think of:
1. You could create/use a toolchain that will compile these languages to native code, which may give you about the same flexibility that you get from C. [Singularity does this, with some of (2) mixed in]
2. You can create your own minimal execution environment as part of the OS, e.g. build a JVM that runs on bare metal. This part would have to either be written in a lower-level language or use the trick from (1).
3. You can implement a basic stub OS that's just enough to run your higher level execution environment. This will require essentially an entire working kernel written in a lower-level language. [I've worked on getting a JVM to work in a toy OS. You pretty much need a fully-fledged scheduler and memory manager.]
There are at least three aproaches I can think of:
1. You could create/use a toolchain that will compile these languages to native code, which may give you about the same flexibility that you get from C. [Singularity does this, with some of (2) mixed in]
2. You can create your own minimal execution environment as part of the OS, e.g. build a JVM that runs on bare metal. This part would have to either be written in a lower-level language or use the trick from (1).
3. You can implement a basic stub OS that's just enough to run your higher level execution environment. This will require essentially an entire working kernel written in a lower-level language. [I've worked on getting a JVM to work in a toy OS. You pretty much need a fully-fledged scheduler and memory manager.]
Re: Language C
Programs that accompany the OS could be written in interpreted languages such as the ones you mentioned, MadWolf. Programs that most people think of as part of a modern, full-featured OS aren't really part of the OS itself. Examples of such programs are help systems, application installers, shells, and utilities. They could be written in interpreted languages. Microsoft itself is increasingly using C# and its accompanying .NET Framework in that way. For example, Microsoft's .NET is required by its PowerShell shell.
ReactOS's devs stay with C and C++ because they are mature, well-understood tools supported by many other commonly used development tools. Adding support in the ReactOS tool chain for just one additional language, especially an interpreted one, would be a great burden on the developer team (devs) but yield relatively little new coding productivity or benefit. Then comes the even greater burden of maintenance! As a result, the Missing ReactOS Functionality page of the ReactOS Wiki lists ".NET alternative such as Mono" among the Low Priority Framework implementations.
Yet, ReactOS Newsletter 96 (back when there was a periodic newsletter written by one of the devs and the Higgs boson was not yet found) included this remark, "There is a very large body of applications on Windows written using the .NET framework, especially in the corporate world. Ultimately, support for that framework is going to be important from a strategic perspective." Be warned though, "ultimately" could be a day far, far in ReactOS's future.
-
- Posts: 215
- Joined: Wed Feb 21, 2018 3:46 pm
- Location: Somewhere in France
Re: Language C
The problem is not the language used but the code.
I mean, if someone use an exotic language, but made a clean code with commented for useful features, everyone doesn't care of the language used.
But if you use a famous language, and made some mistake, causing BSoD, with no comment for a useless think, everyone should be mad.
I mean, if someone use an exotic language, but made a clean code with commented for useful features, everyone doesn't care of the language used.
But if you use a famous language, and made some mistake, causing BSoD, with no comment for a useless think, everyone should be mad.
Who is online
Users browsing this forum: Ahrefs [Bot] and 47 guests