By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,070 Members | 1,237 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,070 IT Pros & Developers. It's quick & easy.

What do Java programmers feel is missing from C#?

P: n/a
mc
I may be opening a can of worms and don't want to start a religious war,
but...

What features of Java do Java programmers miss when working in C#?

Other than, of course, great portability. C# has more limited
cross-platform portability (Mono).

I'm thinking more about data structures and ways to express algorithms.
Mar 8 '08 #1
Share this Question
Share on Google+
20 Replies


P: n/a
mc wrote:
I may be opening a can of worms and don't want to start a religious war,
but...

What features of Java do Java programmers miss when working in C#?

Other than, of course, great portability. C# has more limited
cross-platform portability (Mono).

I'm thinking more about data structures and ways to express algorithms.
I sort of liked fall-thru in switch statements, but I'm the first to
admit that it can lead to unreadable code.

The Java Language Reference mentions something called a Duff's Device,
which I never really understood and which C# would probably frown on
anyway. :)

dleifker

Mar 8 '08 #2

P: n/a
mc

"Dan Leifker" <dl******@leifker.comwrote in message
news:KI******************************@comcast.com. ..
mc wrote:
>I may be opening a can of worms and don't want to start a religious war,
but...

What features of Java do Java programmers miss when working in C#?

Other than, of course, great portability. C# has more limited
cross-platform portability (Mono).

I'm thinking more about data structures and ways to express algorithms.

I sort of liked fall-thru in switch statements, but I'm the first to admit
that it can lead to unreadable code.
Actually, I think the switch statement is the most awkward thing in C#,
largely because it isn't the Fortran-like thing from C that it looks like.
I wish C# had adopted the Pascal case statement.
Mar 9 '08 #3

P: n/a
mc wrote:
I may be opening a can of worms and don't want to start a religious war,
but...

What features of Java do Java programmers miss when working in C#?

Other than, of course, great portability. C# has more limited
cross-platform portability (Mono).

I'm thinking more about data structures and ways to express algorithms.
I am just esthetically prefer Java. I think Java is simpler language.
There is no properties, no defined operators, no delegates - for me it
makes everything more clear. I know only one language that is comparable
in transparency - C.
I also liked Java collections Api and general API more - just preference.
Java has checked exceptions and this makes dealing with exceptions more
easy - you mostly know which exceptions you can expect.
JavaDoc - is more clear that C# XML Docs, and in my opinion leads to
better quality API descriptions.
I prefer Java Strict package / folder structure to unclear C# conventions.
Mar 9 '08 #4

P: n/a
mc wrote:
Actually, I think the switch statement is the most awkward thing in C#,
largely because it isn't the Fortran-like thing from C that it looks like.
I wish C# had adopted the Pascal case statement.
But I seem to recall (good grief, I learned Pascal in 1981) that the
Pascal case statement had no default/otherwise/else, right? Well, I
don't think it did on that creaking Univac we used, but I just Googled
it and and I guess other flavors of Pascal did support it.

See also Brian Kernighan's famous paper about Pascal at:

http://www.cs.virginia.edu/~evans/cs...on-pascal.html

One bit of trivia about the Java default (I think) is that it can occur
anywhere in the case sequence, even at the top.

cheers
dleifker
Mar 9 '08 #5

P: n/a
mc
>I wish C# had adopted the Pascal case statement.
>
But I seem to recall (good grief, I learned Pascal in 1981) that the
Pascal case statement had no default/otherwise/else, right? Well, I don't
think it did on that creaking Univac we used, but I just Googled it and
and I guess other flavors of Pascal did support it.
Yes... when I say Pascal I really mean Turbo Pascal and Delphi. Early
Pascal was impoverished in some ways, as Kernighan pointed out in the paper
you cite.
http://www.cs.virginia.edu/~evans/cs...on-pascal.html


Mar 9 '08 #6

P: n/a
Well now that just has to be the IDE... Visual Studio is just so 1990's

"mc" <lo**@www.ai.uga.edu.for.addresswrote in message
news:4f*****************@bignews5.bellsouth.net...
>I may be opening a can of worms and don't want to start a religious war,
but...

What features of Java do Java programmers miss when working in C#?

Other than, of course, great portability. C# has more limited
cross-platform portability (Mono).

I'm thinking more about data structures and ways to express algorithms.


Mar 9 '08 #7

P: n/a
mc

"Nobody" <no****@shaw.cawrote in message
news:lyYAj.66457$pM4.24579@pd7urf1no...
Well now that just has to be the IDE... Visual Studio is just so 1990's
What kind of IDE do you prefer?

>
"mc" <lo**@www.ai.uga.edu.for.addresswrote in message
news:4f*****************@bignews5.bellsouth.net...
>>I may be opening a can of worms and don't want to start a religious war,
but...

What features of Java do Java programmers miss when working in C#?

Other than, of course, great portability. C# has more limited
cross-platform portability (Mono).

I'm thinking more about data structures and ways to express algorithms.



Mar 10 '08 #8

P: n/a
On Sat, 8 Mar 2008 10:26:56 -0500, "mc"
<lo**@www.ai.uga.edu.for.addresswrote:
>I may be opening a can of worms and don't want to start a religious war,
but...

What features of Java do Java programmers miss when working in C#?
I miss the slow performance of Java and overall lack of productivity
and the vast amount of crappy offshored leftover code I used to work
on.

I get so much more done in C# it leaves me longing for that crappy
Java environment I left behind.
Mar 11 '08 #9

P: n/a
Harry Walters wrote:
I miss the slow performance of Java and overall lack of productivity
and the vast amount of crappy offshored leftover code I used to work
on.

I get so much more done in C# it leaves me longing for that crappy
Java environment I left behind.
I did a quick Google search for "java c# benchmark" (try it yourself)
and it seems that it's only that offshored code that is slow and crappy
and not Java itself, because all benchmarks I could find concludes that
Java is way faster than C#.
Mar 11 '08 #10

P: n/a
mc
"Harry Walters" <no****@notmail.comwrote in message
news:mk********************************@4ax.com...
I get so much more done in C# it leaves me longing for that crappy
Java environment I left behind.
Ah, the fast pace of modern life :)

Likewise, a whole generation of office workers longs for the days of snail
mail instead of e-mail, so that we would actually be allowed some *time* to
do our work :)
Mar 11 '08 #11

P: n/a
mc
I did a quick Google search for "java c# benchmark" (try it yourself)
and it seems that it's only that offshored code that is slow and crappy
and not Java itself, because all benchmarks I could find concludes that
Java is way faster than C#.
Well, this one:

http://www.manageability.org/blog/ar...m_with_cameron

is the first one that comes up, but obviously something has gone wrong. A
factor of 7700 speed difference? They're just not measuring the same thing.
If C# were 7700 times slower than Java, it would be unusable.

I'm going to explore this and see what I can find out. A quick test shows
that his C# program is indeed woefully slow.

Mar 11 '08 #12

P: n/a
mc

"mc" <lo**@www.ai.uga.edu.for.addresswrote in message
news:vx*****************@bignews1.bellsouth.net...
>I did a quick Google search for "java c# benchmark" (try it yourself)
and it seems that it's only that offshored code that is slow and crappy
and not Java itself, because all benchmarks I could find concludes that
Java is way faster than C#.

Well, this one:

http://www.manageability.org/blog/ar...m_with_cameron

is the first one that comes up, but obviously something has gone wrong. A
factor of 7700 speed difference? They're just not measuring the same
thing. If C# were 7700 times slower than Java, it would be unusable.

I'm going to explore this and see what I can find out. A quick test shows
that his C# program is indeed woefully slow.
Quick preliminary answer: Both of the programs measure the time taken to
*compile* a regex, not the time taken to run it. The two compilers are
probably doing very different things.
Mar 11 '08 #13

P: n/a
On Tue, 11 Mar 2008 11:14:43 -0400, "mc"
<lo**@www.ai.uga.edu.for.addresswrote:
>
"mc" <lo**@www.ai.uga.edu.for.addresswrote in message
news:vx*****************@bignews1.bellsouth.net.. .
>>I did a quick Google search for "java c# benchmark" (try it yourself)
and it seems that it's only that offshored code that is slow and crappy
and not Java itself, because all benchmarks I could find concludes that
Java is way faster than C#.

Well, this one:

http://www.manageability.org/blog/ar...m_with_cameron

is the first one that comes up, but obviously something has gone wrong. A
factor of 7700 speed difference? They're just not measuring the same
thing. If C# were 7700 times slower than Java, it would be unusable.

I'm going to explore this and see what I can find out. A quick test shows
that his C# program is indeed woefully slow.

Quick preliminary answer: Both of the programs measure the time taken to
*compile* a regex, not the time taken to run it. The two compilers are
probably doing very different things.
It's like dude went very far out of the way to find some bizarre
benchmark to suit his goal. Who uses compiled regexs in c#
applications?
Mar 12 '08 #14

P: n/a
On Tue, 11 Mar 2008 10:08:13 -0400, "mc"
<lo**@www.ai.uga.edu.for.addresswrote:
>"Harry Walters" <no****@notmail.comwrote in message
news:mk********************************@4ax.com.. .
>I get so much more done in C# it leaves me longing for that crappy
Java environment I left behind.

Ah, the fast pace of modern life :)

Likewise, a whole generation of office workers longs for the days of snail
mail instead of e-mail, so that we would actually be allowed some *time* to
do our work :)
Those guys are called COBOL programmers, and they make the big bucks
:)
Mar 12 '08 #15

P: n/a
mc

"Harry Walters" <ba******@badabang.comwrote in message
news:t8********************************@4ax.com...
On Tue, 11 Mar 2008 11:14:43 -0400, "mc"
<lo**@www.ai.uga.edu.for.addresswrote:
....
>>I'm going to explore this and see what I can find out. A quick test
shows
that his C# program is indeed woefully slow.

Quick preliminary answer: Both of the programs measure the time taken to
*compile* a regex, not the time taken to run it. The two compilers are
probably doing very different things.

It's like dude went very far out of the way to find some bizarre
benchmark to suit his goal. Who uses compiled regexs in c#
applications?
I do, in a tokenizer -- I compile a handful of them and then use each of
them thousands of times. Nobody compiles a million different regexes and
uses each of them only once.
Mar 12 '08 #16

P: n/a
Give me IntelliJ or Eclipse any day.

"mc" <lo**@www.ai.uga.edu.for.addresswrote in message
news:s6*****************@bignews1.bellsouth.net...
>
"Nobody" <no****@shaw.cawrote in message
news:lyYAj.66457$pM4.24579@pd7urf1no...
>Well now that just has to be the IDE... Visual Studio is just so 1990's

What kind of IDE do you prefer?

>>
"mc" <lo**@www.ai.uga.edu.for.addresswrote in message
news:4f*****************@bignews5.bellsouth.net.. .
>>>I may be opening a can of worms and don't want to start a religious war,
but...

What features of Java do Java programmers miss when working in C#?

Other than, of course, great portability. C# has more limited
cross-platform portability (Mono).

I'm thinking more about data structures and ways to express algorithms.




Mar 12 '08 #17

P: n/a
mc

"Nobody" <no****@shaw.cawrote in message
news:wGIBj.73115$w94.22154@pd7urf2no...
Give me IntelliJ or Eclipse any day.
And what do you feel are their advantages over Visual Studio?

>
"mc" <lo**@www.ai.uga.edu.for.addresswrote in message
news:s6*****************@bignews1.bellsouth.net...
>>
"Nobody" <no****@shaw.cawrote in message
news:lyYAj.66457$pM4.24579@pd7urf1no...
>>Well now that just has to be the IDE... Visual Studio is just so 1990's

What kind of IDE do you prefer?

>>>
"mc" <lo**@www.ai.uga.edu.for.addresswrote in message
news:4f*****************@bignews5.bellsouth.net. ..
I may be opening a can of worms and don't want to start a religious war,
but...

What features of Java do Java programmers miss when working in C#?

Other than, of course, great portability. C# has more limited
cross-platform portability (Mono).

I'm thinking more about data structures and ways to express algorithms.




Mar 13 '08 #18

P: n/a
mc wrote:
I may be opening a can of worms and don't want to start a religious war,
but...

What features of Java do Java programmers miss when working in C#?

Other than, of course, great portability. C# has more limited
cross-platform portability (Mono).

I'm thinking more about data structures and ways to express algorithms.

Ehm, the main thing about Java is that it tries to keep out feature
creep. So what I'm missing in C# is any constraint to keep features out.

It's starting to look as another D language, in which you can do
anything. That's fine if you are a single programmer that does not care
about reuse or refactoring, but it's madness for enterprise code.

That you still have to take care to make things "virtual" is another
thing I'm really missing.

In other words: KISS (keep it Simple, stupid) is missing.

That's not to say that C# does not have a lot of things going for it,
some features are very useful, like checked code fragments (which, of
course, should have been the default, just like the virtual keyword).

Maarten
Mar 23 '08 #19

P: n/a
I never met a benchmark I didn't like.
BobJ
"Harry Walters" <ba******@badabang.comwrote in message
news:t8********************************@4ax.com...
On Tue, 11 Mar 2008 11:14:43 -0400, "mc"
<lo**@www.ai.uga.edu.for.addresswrote:
>>
"mc" <lo**@www.ai.uga.edu.for.addresswrote in message
news:vx*****************@bignews1.bellsouth.net. ..
>>>I did a quick Google search for "java c# benchmark" (try it yourself)
and it seems that it's only that offshored code that is slow and crappy
and not Java itself, because all benchmarks I could find concludes that
Java is way faster than C#.

Well, this one:

http://www.manageability.org/blog/ar...m_with_cameron

is the first one that comes up, but obviously something has gone wrong.
A
factor of 7700 speed difference? They're just not measuring the same
thing. If C# were 7700 times slower than Java, it would be unusable.

I'm going to explore this and see what I can find out. A quick test
shows
that his C# program is indeed woefully slow.

Quick preliminary answer: Both of the programs measure the time taken to
*compile* a regex, not the time taken to run it. The two compilers are
probably doing very different things.

It's like dude went very far out of the way to find some bizarre
benchmark to suit his goal. Who uses compiled regexs in c#
applications?

Jun 27 '08 #20

P: n/a
I don't think this guy knows what he's doing. There's no possible way "c#"
is that much slower. I doubt it's even slower at all. And besides, c#
doesn't have a speed. it's only language. It gets compiled to msil. you
could time the execution of msil, but not c#. If he was really interested
in doing a proper test, he would have at least run a profiler on each peice
of code to figure out where the time was spent.

Additionally, this nitwit makes the comment that the c# took more lines of
code than the java. Not that it really matters, but if it did, it's
probably because in the java version he combined several statements on to
single lines, where he didn't in c#.


"BobJ" <rj*****@earthlink.netwrote in message
news:OJ******************************@earthlink.co m...
>I never met a benchmark I didn't like.
BobJ
"Harry Walters" <ba******@badabang.comwrote in message
news:t8********************************@4ax.com...
>On Tue, 11 Mar 2008 11:14:43 -0400, "mc"
<lo**@www.ai.uga.edu.for.addresswrote:
>>>
"mc" <lo**@www.ai.uga.edu.for.addresswrote in message
news:vx*****************@bignews1.bellsouth.net ...
I did a quick Google search for "java c# benchmark" (try it yourself)
and it seems that it's only that offshored code that is slow and
crappy
and not Java itself, because all benchmarks I could find concludes
that
Java is way faster than C#.

Well, this one:

http://www.manageability.org/blog/ar...m_with_cameron

is the first one that comes up, but obviously something has gone wrong.
A
factor of 7700 speed difference? They're just not measuring the same
thing. If C# were 7700 times slower than Java, it would be unusable.

I'm going to explore this and see what I can find out. A quick test
shows
that his C# program is indeed woefully slow.

Quick preliminary answer: Both of the programs measure the time taken to
*compile* a regex, not the time taken to run it. The two compilers are
probably doing very different things.

It's like dude went very far out of the way to find some bizarre
benchmark to suit his goal. Who uses compiled regexs in c#
applications?


Jun 27 '08 #21

This discussion thread is closed

Replies have been disabled for this discussion.