Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Java 5 vs. C#

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm just a Java developer (I have never found the time to explore C#), but many experienced developers that I work with looked at C# recently and think highly of it, and most believe that it is ahead of Java. Is Java 5 going to do anything to change their minds?
 
Ranch Hand
Posts: 1011
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C# is very similar to Java (current version) but more powerful in my opinion. C# was actually borrowing 70% stuff from Java, 20% from C/C++ and 10% from VB5.
C# is brilliant because it stands on the shoulders of the giants.
I also took look at the new features for Java 5. I believe it will also brilliant too.
 
author
Posts: 799
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some of the 5.0 features are very similar to things already existing in C#, including the enhanced for loop, autoboxing, and annotations. For an interesting (and biased) take on how the generics implementation compares, see
http://www.artima.com/intv/generics.html.

-j-
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Jeff Langr:
For an interesting (and biased) take on how the generics implementation compares, see
http://www.artima.com/intv/generics.html.



Thanks a lot for the great article... It is wonderful that one of the interviewers is the author of "Thinking in Java"?

Great conversation between the great C# architect and the famous Java book author...

I found the following is interesting for me...

Java's generics implementation was based on a project originally called Pizza, which was done by Martin Odersky and others. Pizza was renamed GJ, then it turned into a JSR and ended up being adopted into the Java language. And this particular generics proposal had as a key design goal that it could run on an unmodified VM [Virtual Machine]. It is, of course, great that you don't have to modify your VM, but it also brings about a whole bunch of odd limitations. The limitations are not necessarily directly apparent, but you very quickly go, "Hmm, that's strange."

 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java VS C# : code-for-code comparison
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C# is a lot like Delphi really - one can almost say it's Delphi with a C-type syntax.

Not surprising, as the architect behind C# was also the driving force behind Delphi when he was still employed by Borland - I've forgetten his name. Maybe someone else knows?

Java is very similar to both of these too - single inheritance, nice language constructs, not too much of the convoluted unreadable c**p that C/C++ is so well known and loved for.

Uwe
 
I am Arthur, King of the Britons. And this is a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic