# I want to Compare C to Java

**URL:** <https://boards.straightdope.com/t/i-want-to-compare-c-to-java/207520>\
**Category:** Factual Questions\
**Created:** [October 15, 2003, 6:32am UTC](https://boards.straightdope.com/t/i-want-to-compare-c-to-java/207520 "2003-10-15T06:32:22Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [October 16, 2003, 4:49am UTC](https://boards.straightdope.com/t/i-want-to-compare-c-to-java/207520/21 "2003-10-16T04:49:04Z")

</div>

> [@](#):
>
> 1. It only runs on Microsoft Windows. OK enough for the desktop, but not very scalable on the server. Java works on anything from a PDA to a big hunk of iron.

Precisely. Any language which forces you to code to a specific machine _without_ offering substantial performance benefits\* in return is not really apropriate for any use after, say, 1975. By the 1970s, C had emerged as a viable way to write programs that you could reasonably expect to compile and run on _any_ of a class of relatively diverse machines. Serious programming, especially in the realm of OSes, would never be the same.

\*Yes, I do program assembly. I have a few x86 machines I code assembly for (between cussing out Intel) and a relatively good System/360 emulator I code assembly for (and no, it _doesn’t_ require traditional JCL :)). It’s fun, it can gain me a bunch of bytes/clock cycles over trusting gcc, and it keeps my low-level skills sharp. 😉

---

<div class="post-metadata">

**Author:** ![Ms2001](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ms2001/32/18463_2.png) [@Ms2001](https://boards.straightdope.com/u/Ms2001)\
**Post date:** [October 16, 2003, 6:46am UTC](https://boards.straightdope.com/t/i-want-to-compare-c-to-java/207520/22 "2003-10-16T06:46:43Z")

</div>

> [@](#):
>
> \*Originally posted by 5cents \*  
> **1. It’s single-vendor.  
> …  
> 2. It only runs on Microsoft Windows.**

Not so - take a look at [MCS: The Ximian C# Compiler](http://www.go-mono.com/c-sharp.html).

---

<div class="post-metadata">

**Author:** ![5cents](https://avatars.discourse-cdn.com/v4/letter/5/46a35a/32.png) [@5cents](https://boards.straightdope.com/u/5cents)\
**Post date:** [October 16, 2003, 1:18pm UTC](https://boards.straightdope.com/t/i-want-to-compare-c-to-java/207520/23 "2003-10-16T13:18:54Z")

</div>

> [@](#):
>
> \*Originally posted by Mr2001 \*  
> \*\*Not so - take a look at [MCS: The Ximian C# Compiler](http://www.go-mono.com/c-sharp.html). \*\*

It’s a start, but it is a long way off from being universal.

Microsoft can change .Net/c#/MSIL/etc whenever it wants, to the benfit of Windows and the detriment of everything else. With Java, although Sun used to be able to change it at will, this hasn’t been true for a number of years (every change has to go through the JCP).

---

<div class="post-metadata">

**Author:** ![Ms2001](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ms2001/32/18463_2.png) [@Ms2001](https://boards.straightdope.com/u/Ms2001)\
**Post date:** [October 18, 2003, 3:59am UTC](https://boards.straightdope.com/t/i-want-to-compare-c-to-java/207520/24 "2003-10-18T03:59:58Z")

</div>

> [@](#):
>
> \*Originally posted by 5cents \*  
> **Microsoft can change .Net/c#/MSIL/etc whenever it wants, to the benfit of Windows and the detriment of everything else.**

I don’t think that’s correct. The CLI (a.k.a. CLR) and C# have been [standardized by ECMA and ISO/IEC](http://msdn.microsoft.com/net/ecma/). I suppose Microsoft could put proprietary extensions in their own compiler, but every compiler vendor already does that with C++.

[Previous page](https://boards.straightdope.com/t/i-want-to-compare-c-to-java/207520.md?page=1)
