Perhaps then the definition of "the world's best programming language" is, "The best language for the job"
Perhaps then the definition of "the world's best programming language" is, "The best language for the job"
Is this like asking a golfer which golf club is best?
Windows xp was written in C++. *cheers* Answer your question?
Java is to high-level to write a good os with anyhow.
You could write an OS in Java essentially in the same manner Singularity was wrote using C# (information here.) Of course, you're not going to write your OS in one single language by any means: otherwise, pretty much every major operating system would violate this rule, so that's kind of a bad way to define an operating system if you're thinking of it in that way.
Java is not inherently tied to the JVM either: that's just an implementation of Java. You can compile Java to native code (see: GCJ,) and you can link it into a simple flat binary; it is by no means impossible (impractical? I dare say maybe.) It's been a while since I've been interested in real operating system design/implementation. I wouldn't say Java is the best choice, but it's not an impossible choice.
operating systems: mac os 10.6, debian 5.0, windows 7
editor: back to emacs because it's more awesomer!!
version control: git
website: http://0xff.ath.cx/~as/
To go off topic at a sig,
I must say, that's disgusting. What's wrong withOriginally Posted by Mad_guy
But no, seriously, what do you have againstCode:s :: StateT Int IO () s = sequence_ . replicate 10 $ do n <- get liftIO $ putStrLn ("hello " ++ show n ++ "!") put (n+1)
You're making me cry :-(Code:main = mapM_ (putStrLn . ("hello " ++) . (++ "!")) [1..10]
Last edited by Rashakil Fol; 05-17-2007 at 10:22 PM.
There are 10 types of people in this world, those who cringed when reading the beginning of this sentence and those who salivated to how superior they are for understanding something as simple as binary.
Certainly it is possible in Java, but in my opinion it is the worst choice possible.
Most OS's will use a heavy amount of Assembly at the extreme lower levels, and then the bulk of the OS itself will be in C, with lots of C++ once you start getting into the higher levels.
To even consider the option of Java makes me shudder...
Windows XP is not written in C++ and for the most part, newsflash here, the versions of Windows since 95 have not changed all that much under the hood.
The core kernel code was ported to pure 32-bit code and uses protected mode but the API has really not changed much. It has acquired a significant amount of 'bloat' since those early days and I'm not sure if that's better or worse.
Actually approx 70%+ of the NT4/XP kernel is in C++. The front end to XP is in C++. Have a look at the link in my sig...
There's been 3 kernels up until and including Vista, the 9x kernel, NT kernel and Vista Kernel. Other than the introduction of a few "features" like .NET and the like, I agree Windows hasn't changed that much over the past 12 or so years.Windows XP is not written in C++ and for the most part, newsflash here, the versions of Windows since 95 have not changed all that much under the hood.
Last edited by zacs7; 05-18-2007 at 06:17 AM.
So, Bubba what you are saying is when M$ created Vista, they hardly touched the core program at all? All they did was change a few files and add some new flashy extras, This is just a guess, so please dont kill me over this assumptsion, im no where near as cluded up as you are about the tech side of Windows
Double Helix STL
And the NT kernel is a complete rewrite of the old DOS-wrapper kernel of the 9x series. It's got very little in common under the hood with Win95. It's the exposed API that's largely the same.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
if you want proof that XP is largely written in C++, just look at the Windows 2000 source leak.
CornedBee is correct. The generally exposed API to the system's application is largely the same, but NT is an extremely different architecture from Windows 95. If you were still running on the 9x series kernel, you'd know it. NT is architecturally very different and it is much more robust all around. These changes are largely not exposed to user-mode however, which is why a large portion of apps written for the 9x series were easily portable to 2k/XP. If the kernel's were "pretty much the same," you wouldn't need two different releases of tools such as, say, Process Explorer. You wouldn't need two releases of one driver for both systems.
The kernel is different. I've done plenty of work pertaining to low-level windows internals, primarily in the NT realm, but just looking at the evidence it's easy to conclude that things have changed in relation to the kernel since windows 95.
If that's in reference to being a complete rewrite, it's orthogonal to the point anyway.if you want proof that XP is largely written in C++, just look at the Windows 2000 source leak.
You make me cry with your haskell skills. :( (edit: changed)
Last edited by Mad_guy; 05-20-2007 at 11:34 AM.
operating systems: mac os 10.6, debian 5.0, windows 7
editor: back to emacs because it's more awesomer!!
version control: git
website: http://0xff.ath.cx/~as/
Making a kernel which runs on a run-time environment? Does someone try to make me laugh?
"The Internet treats censorship as damage and routes around it." - John Gilmore
No, you just can't read:
Granted, you may have to have special versions of your libraries, but generally you'll have to bootstrap parts of your libraries regardless of the language anyway if you're going to write an OS.You can compile Java to native code (see: GCJ,) and you can link it into a simple flat binary
operating systems: mac os 10.6, debian 5.0, windows 7
editor: back to emacs because it's more awesomer!!
version control: git
website: http://0xff.ath.cx/~as/
Regardless of what JVM you are using, and regardless of what platform you are developing for, Java does not let you have hands on access to memory in any way.
Therefore, even if you compiled Java code to a flat binary, instead of interpreted byte code, the fact is that at the code level, when you wrote it, you still didn't have that hands on access to memory.
So, in order to write any type of OS in Java, there would have to be a specialized library written which allows you to access those protected things that Java normally keeps from you.