Moving from Java to C++

Programming, for all ages and all languages.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re: Moving from Java to C++

Post by Colonel Kernel »

Combuster wrote:As Colonel Kernel would say: go read the research papers.
Pretty soon, that's all people will remember when they think of me! :P
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Moving from Java to C++

Post by Love4Boobies »

berkus wrote:
Colonel Kernel wrote:
Combuster wrote:As Colonel Kernel would say: go read the research papers.
Pretty soon, that's all people will remember when they think of me! :P
That's something you should start from, reading the research papers, there's quite a lot of research going on in OS area, it's a pity not all OS developers at least skim through these papers.
Oh, gee... good advice :wink: I do my share of reading, it's just that it seems I didn't do enough on this particular subject...
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
i586coder
Member
Member
Posts: 143
Joined: Sat Sep 20, 2008 6:43 am

Re: Moving from Java to C++

Post by i586coder »

To the best of my knowledge most C++ programmers change there minds to JAVA and
not the contrary, since JAVA is full OOP language ,and on other hand JAVA is adopt
all C++ advantages, and JAVA added some concepts like garbage collections

maybe you want to learn C++ because most OS's codded in this language, but don't
forget there is some OS's coded in JAVA like JavaOS
you can read more
http://en.wikipedia.org/wiki/JavaOS

Cheers :mrgreen:
a.T.d
Distance doesn't make you any smaller,
but it does make you part of a larger picture.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Moving from Java to C++

Post by Solar »

...and when we thought the subject has been sufficiently talked over, here comes the Java advertisment. :roll:

<rant>
*deleted because we went just fine without one so far*
</rant>
Every good solution is obvious once you've found it.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Moving from Java to C++

Post by Solar »

At least it's not telling you to do things the X way in release 1.2, the Y way in release 1.3, and the X way in release 1.4...
Every good solution is obvious once you've found it.
User avatar
JackScott
Member
Member
Posts: 1031
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Contact:

Re: Moving from Java to C++

Post by JackScott »

And then decide at release 1.6 that you would rather call it release 6 instead?
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Moving from Java to C++

Post by Love4Boobies »

I thought this was a discussion on languages, not compilers...
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Moving from Java to C++

Post by Solar »

We're not talking compilers.
Every good solution is obvious once you've found it.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Moving from Java to C++

Post by AJ »

i586coder wrote:but don't
forget there is some OS's coded in JAVA like JavaOS
you can read more
http://en.wikipedia.org/wiki/JavaOS
JavaOS Wikipedia Article wrote:As of 2006, Sun considers JavaOS a legacy system.
Cheers,
Adam
User avatar
i586coder
Member
Member
Posts: 143
Joined: Sat Sep 20, 2008 6:43 am

Re: Moving from Java to C++

Post by i586coder »

JavaOS Wikipedia Article wrote:As of 2006, Sun considers JavaOS a legacy system.
YAP!, unfortunately, JAVAos and OS/2 has the same Destiny, but at last you can consider JAVAos as prototype, so you can write OS using JAVA

Cheers, :mrgreen:
a.T.d
Distance doesn't make you any smaller,
but it does make you part of a larger picture.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Moving from Java to C++

Post by AJ »

Hi,

While I don't want to be seen as flaming (I am genuinely interested in bytecode OSes), I have read up on some more background info and came up with this:
The OS itself is 85% written in Java. The drivers are being written in assembler, and some Java Virtual Machine (JVM) and API routines are being written in C++. All of this adds up to one very fast operating system.
If (as stated in a post above) Java has adopted all of C++'s advantages and added extra features, why couldn't more than 85% of the system be written in Java? Also, why have Sun Microsystems given up on JavaOS? You would think that if anyone could make a Java OS work, it would be Sun.

I personally think it's wrong to define an OS by the language it is written in. As I said above, I'm very interested in bytecode / managed / IL OSes, but don't see what advantage it is to a project to say "We're going to code as much of this OS as possible in x/y/z language, regardless of whether that language is the best tool for the job".

Use Java/C#/Whatever for the parts where that language actually confers some advantage over a traditional language. JM2C.

Cheers,
Adam
User avatar
i586coder
Member
Member
Posts: 143
Joined: Sat Sep 20, 2008 6:43 am

Re: Moving from Java to C++

Post by i586coder »

Hi,


I completely respect your opinion AJ :roll: , but i still believe
PROGRAMING LANGUAGE SOMEHOW the backBone for any OS 8) ,
you know java isn't compiler it's an interpreter,(JAVA generate byteCode), so it's need virtual machine to run that code,and maybe SUN microsystems can't produce hi-quality OS
using JAVA due to that :?: ,

Personally JAVA is the last chance ,i prefer using C/C++ instead.
programming with JAVA, it's tooo slow even with tiny program :x
AJ wrote:
The OS itself is 85% written in Java. The drivers are being written in assembler, and some Java Virtual Machine (JVM) and API routines are being written in C++. All of this adds up to one very fast operating system.
you see, even JAVA still need programing language such assembly/C++ in some parts,since there
is no inline assembly in java, java understands one language ---> CLASS

CheerS,
a.T.d
Distance doesn't make you any smaller,
but it does make you part of a larger picture.
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Re: Moving from Java to C++

Post by AndrewAPrice »

I've become extremely fond of D. A powerful modern language that is designed for systems and applications programming. As said on another thread;
Solar wrote:
Wilkie wrote:No excuses!
What the... :shock: :D
My OS is Perception.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Moving from Java to C++

Post by AJ »

Roll on C++0x (or by the time it's released, will it be C++1x?) :)
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Moving from Java to C++

Post by Solar »

i586coder wrote:you see, even JAVA still need programing language such assembly/C++ in some parts...
I find it quite amusing, in language arguments like these, that the Sun JVM is written in C++. ;-) There's a research project about a Java-written VM, but that hasn't hit mainstream yet (and I am pretty sure that some core components will still be written in, not just "any other compiled language", but C++).
Every good solution is obvious once you've found it.
Post Reply