Java 1.5 vs C#
Here's the list of enhancements to the Java Language:
- Generics (C# 2.0 already supports this)
- Enhanced For-Loop (the foreach construct in C# 1.0, duh!)
- Autoboxing/Unboxing (C# 1.0 already has this, everything is an object, even the primitives - not really, but they do it so well...)
- Typesafe Enums (again C# 1.0 already implemented this, but I think they've added a little bit more twist in Java, that its actually a better implementation)
- Varargs (C# 1.0's params construct, ellipsis construct in C++)
- Static Import (I don't know if C# 1.0 has this, or C#2.0, but C# has a construct for aliasing your imports - which is way cooler. Static Import, actually promotes bad coding habits IMHO)
- Metadata/Annotations (this is C# 1.0's Attributes, Sun's upturned noses just gave it a fancier name - also, C#'s implementation is better and more intuitive)
They've beefed up the API some, and integrated several packages with the regular JSDK that used to be a part of a separate package or installation ---in my NSHO, the Java API has become bloated...
At this point (even before Whidbey) the deciding factor (as always) for Enterprise work, when choosing a language platform, should be the support it has behind it, in terms of IDE, tools, api, and longevity of the vendor pushing it (forget the OpenSource crap argument, those guys are too in love with Perl, Python, and Ruby - Java could become the child nobody wants to talk about if Sun dies) - right now that's C# and the .NET Framework ---
If you ask Paul Graham though, both language would be utter crap and fit only for idiots :) http://www.paulgraham.com/gh.html [I'm exaggerating, so hold off on those flames.]
...and let me tell you, java doesn't have to do that much to "catch up" to it.
"Quoting famous computer scientists out of context is the root of all evil (or at least most of it) in programming." - K
Does this mean the code developers get paid for working overtime?
That sounds like it should be some Adams-esque race of semi-competent space pirates...
Obliteracy: Words with explosions
How about a cross-compiler that takes advantage of this vendor competition in cooperation to combine both communities of programmers into one pool targeting either virtual machine?
--
make install -not war
Fix that first link. It shouldn't have a slash at the end:
a tu res.html
http://java.sun.com/j2se/1.5.0/docs/relnotes/fe
Where's the story? Or is this just one person's interpretation of Java vs. C#?
I've never seen so many grammatical errors. You win.
Attention deficit disorder is a complicated issue, spanning several major... HEY LET'S GO RIDE BIKES!
and you're foundations in OOP is rock-solid
What about our foundations in English?
Quidquid latine dictum sit, altum sonatur.
At this point (even before Whidbey) the deciding factor (as always) for Enterprise work, when choosing a language platform, should be the support it has behind it, in terms of IDE, tools, api, and longevity of the vendor pushing it (forget the OpenSource crap argument, those guys are too in love with Perl, Python, and Ruby - Java could become the child nobody wants to talk about if Sun dies) - right now that's C# and the .NET Framework ---
Why again can't I mod a story as -1 Flamebait?
--
I'll pay you $10. Really.
IBM will then pick it up... it's so clear.
It's a bit unfair to compare the new Java 1.5 release with c# 2.0 since c# 2.0 is not due to be released until sometime Q2 or Q3 next year. But I do agree that before the 1.5 release Java had a lot of catching up to do to c#, but now c# is a bit behind (Mainly because of it's lack of support for generic classes which Java now supports).
Take it easy this article is a lot more correct then most of the ones I read here!
object-oriented design is the roman numerals of computing.
-- Rob Pike
others
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
Seems like the author has a bias towards C#. Is slashdot becoming Fair and Balanced like Fox News.
Oh, you mean "Fair and Balanced" like the usual open source/Linux fanboyism that nomally occurs?
This program has performed an illegal operation and will be shut down. If the problem persists, contact your program vendor.
No folly is more costly than the folly of intolerant idealism. - Winston Churchill
What language was this post written in? Amazing.
Growing up as a software developer in C and C++, I'm really impressed with Java. Although it IS slower and it runs on another layer on top of the OS, it IS still very impressive because OOP gives people the chance to understand programming without having to know much besides how objects interact with each other... (Dog plays with Ball, Car has Wheels, etc.) The platform independence is also a plus, and as our processors increase in speed, the overhead of running on top of a layer which runs on top an OS will become less significant.
I want actual functions, not "activity objects". Almost everyone, except for the extreme OO zealots, agree that OOP is not necessarily the best approach to every problem.
Table-ized A.I.
This would get a -1 Flamebait.
My feeling is that these features are good news. There should be no gloating on the part of C#, it was clearly built on Java's coattails.
Competition is a great thing, ain't it?
It is certainly useful in some situations -- the Math class being the best example I can think of. The fact is, object orientation isn't a universal model of everything; some things, like algorithms, and even singletons, just don't have any need to be "objects". Static Import lets you drop that OO pretense. In the case of Math, where's the bad style in writing Cos(x) instead of Math.Cos(x)?
Maybe it makes more sense to listen to what the tech lead of Java 1.5 had to say here.
(= Calvin Austin)
Neither are open source.
Both require virtual machines.
Despite being marketed as portable, but have portability issues. Java is not backward compatible with older versions. C# has problems with porting some of the graphics stuff to Linux.
We don't really need them. PHP/Perl serve my needs on the web/server side. C++ and Python server my needs on the desktop side.
They're closely tied to their respective companies.
If you think this is flame-bait, check out this article's title.
Seriously, this looks like an ad for C#, a bunch of claims with very little support/evidence for those claims.
I've worked on C# and Java projects. As far as I'm concerned, C# = MS Java. MS could not control Java, so they abandoned support for it and built thier own "version." It's really a rinse & repeat cycle for MS: see successful software, build own version of said software to try to take over that market as well.
After templates (generics) come out in a few months, i dont expect java to have an easy time catching up.Personally, I really miss templates from C++ and would drift over to the camp that offers it.
The war with islam is a war on the beast
The war on terror is a war for peace
Perhaps /. will correct the error. I emailed the editor when the story was in preview, but it was too late.
It might be a good step if Java becomes open source; then it's on a different playing field than C# because it seems that the authors of Java realized that C# is superior in many ways.
The playing field they would enter, however, already belongs to Mono.
So, who will survive?
I guess Java has started a revolution without an "exit strategy."
Who mediates your information?
Here's my theory. Along with the ubiquitous slashvertisements and the Microsoft-bash-of-teh-day barrage posts, these are a perfect opportunity to create a story that will generate 1,000+ comments and ten times those many page views and ergo ad impressions.
C'mon, C# vs. Java? Outside of "RIAA sues 86 year-old grandma", "We hate Bush, let's talk" and "Microsoft patents KDE" there is no better source of inflammatory material in the dorkosphere.
Sad, really.
I can understand +1 funny, but INTERESTING, hmmmm
Is this article flamebait? Maybe I am just misunderstanding when he says:
"At this point (even before Whidbey) the deciding factor (as always) for Enterprise work, when choosing a language platform, should be the support it has behind it, in terms of IDE, tools, api, and longevity of the vendor pushing it (forget the OpenSource crap argument, those guys are too in love with Perl, Python, and Ruby..."
Which "crap" argument is he talking about? I assume he means that when using those languages you have thousands of directions to go for help in howtos, docs, tutorials, books and of course the loving #perl. I normally would not reply to something like that, but I took offense. Yes I love those languages. They all have strong points and make life fun when coding. I have support and have never had to rely on a company to provide said support. Oh yeah, and I write enterprise software with the mod_perl crap everyday of my life. Thanks.
iamchaos
I never did understand the need/desire for varargs in Java. Isn't that what polymorphism is for?
No folly is more costly than the folly of intolerant idealism. - Winston Churchill
So which version number is it? Java 2, Java 1.5, or Java 5? Someone should teach these guys to count before they start coding!
Java has a few advantages over C# in optimization. It's very easy to analyze Java programs to be certain that certain memory locations absolutely will not be modified. That's much harder in languages with native pointers. Those invariants allow you to compile out certain calculations that would have to be done at runtime in a C# program. You can even start spreading loop cycles over multiple CPUs, but I'm pretty certain that the present JVMs aren't that smart.
CMDRTACO CHECK YOUR EMAIL!
XML Parser
You mean like JAXP and JAXB?
Attention deficit disorder is a complicated issue, spanning several major... HEY LET'S GO RIDE BIKES!
It has been corrected now.
I'm not pleased with the "catch-up" game that Java is playing here. Java was a fairly nice middle-ground betweeen high and low level programming, and what appears to be an effort to become a high level language is rather ominous for those who are interested in testability and performance in Java.
This, BTW, is why you don't want your language to be controled by a company which in turn has a marketing-driven bottom-line. The idea that two languages could co-exist with different target audiences is nonsense to marketing droids, but perfectly reasonable to someone like Guido van Rossum, Larry Wall or any of the other maintainers of truly open-source languages. Open source isn't the only way to maintain this focus, but in today's marketing-driven world, you aren't likely to see too many Bell Labs-like organizations putting out languages like C (which was semi-open source, as was Unix). Java and C# are probably much more typical.
So Java is playing syntax catchup with 1.5. (Not making a statement, just noting what the intro seems to imply.) Great, they both seem to be taking plays from the good ol' C playbook. What appservers are available for C# though? Anything not made by Microsoft?
I wonder how Tiger compares to ASP.NET 2.0? http://www.asp.net/whidbey/
SexyFingers writes "Sun released Java 1.5...
The ultimate question is... how did you get those sexy fingers ? Java, C# or... Pr0n# ?
getSexySig();
I use DOM within XML as well as the MessageDigest using the MD5 algorithm every day. So I'm letting you know...
Or, is your complaint based on the fact that the libraries that underlie the XML and Security algorithm API's can be swapped out? To me, that's a feature not a bug but YMMV.
Waltz, nymph, for quick jigs vex Bud.
XML:
p hp
http://xml.apache.org/xerces-j/
MD5:
a google search for "md5 java" throws
http://www.twmacinta.com/myjava/fast_md5.
what are you talking about?
whoever wins, we lose.
for object oriented programming (never mind window dressing inheritance).
Combine this with the fact that nothing here is new news, and you really gotta as what exactly /. editors are for.
SexyFingers writes "Sun released Java 1.5. The non-API stuff that they've added made it finally "catch-up" with C# - like we were talking about before, since both language is built to support OOP from the ground-up, their constructs become almost identical as additional OOP "features" are supported overtime - so if you're doing C# and you're foundations in OOP is rock-solid, there really isn't any difference whether you're coding C# or Java."
"both language is built" being just one of the changes...now its "both languages are built..."
WTF? There are still grammatical errors in the "story," even with the changes. If there's nothing new to report, why can't we just have no new stories? Someone please make something like what /. used to be...
I code C# for a living, so according to your definition, sold (or more appropriately rented) my soul to the devil. (This does not change the fact that I personally prefer free/open source technology. My PDA, my media players, my home operating system are all free/open source based.)
Java is not any more closer than C# to open source technologies. Sun doesn't like open source, just as Microsoft.
It's a very well known fact that Java has been a base (or in other words "the" figure) for Microsoft while developing C#, but that does not imply that "Java is good, C# is bad" or vice versa.
I would be happier personally to code in Java, but professional life yields to disqualify who resists new technology.
Your choice of programming language is not your religion, and it can change continuously through your life. Just like your operating system.
A quick Google for "java MD5" gives a code example in the first hit, http://www.bombaydigital.com/arenared/2003/10/10/1
Think before you whine.
It's not so much the language that is a question of contest, but the platform they run on. I've done Java programming since 1.1.8, and have deployed on Tomcat, Resin and Weblogic.
.Net? What the fuck is up with IIS (oh yeah, it's crap)?? Where is any sort of replicated server side session management (no, long ass hidden fields are *not* sessions - and a M$SQLServer *only* solution doesn't count).
.Net's deployment platform (singular). Man I miss working with J2EE platforms and loathe IIS...even though it is my job to keep all this stuff running on IIS! :(
Recently I switched to C# (new job) and I have to tell you, the language is pretty neat with some of the tricks you can do. Nothing ground breaking though.
What's really missing is the platform for release, and release management. Where are WARs and EARs for
The constructs and tricks of a language can be debated as long as you want. You will probably find something nice in every language. But when you have to [operationally] deploy any application, great or not, on some cheap as shit, crap ass, hard to manage, non-repeatable platform such as IIS, that's when the real rubber hits the road with Java.
J2EE deployment platforms are light years ahead of
-bk
While neither Java nor C# is truly free of being controlled by an Evil Corporation(tm), Java at least has multiple vendors, runs on a wide variety of platforms, and has an open standardization process.
So...who cares if java is better/worse than C#?
.NET, it's better than what you're using because we say so, we provide you a nice language likce C#, BUT YOU CAN USE WHATEVER LANGUAGE you want". Which is, to my eyes, looks much better.
.NET platform, the APIs, etc isn't but...) with a open implementation (mono) which is good for people suffering from GPLitis and similar diseases. We can use C# in linux witout using the rest of the .NET platform (same goes for Java, but the sun's java VM license is so weird some distros can't even distribute it without pain...)
What Suns try to sell is Java and the Java platform. Sun tells you "Here you have Java, it's better than what you're using because we say so, and you should use it".
Instead, Microsoft sells you a *real* platform. Microsoft tells you "Here you have
Yes, I know, you can use other languages in java. But that's *not* what Sun wants to do, and it's *not* what it's really happening, and because Java is *not* a real standard (it's controlled by some weird committe) the picture doesn't seems like it's going to change. C# is a real open standard (the rest of the
Plus, Microsoft has the power to say "here you have this lenguage, use it". Sun can try to say the same, but very few people will listen them.
In fact, they've been doing it for 10 years and still everybody uses C++ for things like browsers, AIM clients... (don't tell me Java wasn't targetted to do that, if I can't write normal programs in Java - not because you can't but because Java sucks for that - why I would want to use it in first place?!?)
C'mon, C# vs. Java? Outside of "RIAA sues 86 year-old grandma", "We hate Bush, let's talk" and "Microsoft patents KDE" there is no better source of inflammatory material in the dorkosphere.
Oh, how I pine for the days of vi vs. Emacs.
- Tony
Microsoft is to software what Budweiser is to beer.
See this.
He kind of forgot that there are many programmers and customers who DON'T want to deploy their systems on win32. With Java apps, you don't have to. In fact you can choose almost any operating system and hardware. Anybody who chooses C# over Java for enterprise deployments is truly a MicroWeenie.
:]
I much prefer my 8 processor HP UX box any day
Having to deal with these new features, in large projects with many people, will be hell.
Why is the Java language adding all of the misfeatures of C#? Autoboxing causes more problems in the long run than having to explicitely boxing objects. I'd rather than do a little more typing (no pun intended) to avoid confusing idiosyncracies of autoboxing. Generics? Ugh.. you mean we have to see that nasty template crap from C++ again? Typesafe enums? I haven't had a chance to look at the implementation so I'm going to abstain commenting about them. Varargs-- why? It's so much easier (and more intuitive) to create an array of objects and pass them as a parameter. Static Import? I'll abstain talking about this one as I don't know much about it. All I know is the concept of aliasing imports sucks for large projects! Let's just say, that everyone and their dog will alias various libraries with their own abbreviations and cutting/pasting code snippits between other people will be a fucking pain to detangle! Metadata/annotations/attibutes: Ugh, more syntactic sugar that belongs in the trash. Pain. Agony.
Quite frankly, I'd rather work in the ((parenthesis) hell) of Lisp than having to deal with all these unwieldy features.
Let me know when stuff like an XML Parser and MD5 are native in Java.
They ARE.
XML package
MD5 and SHA support
The former has been in Java since 1.3, and the later since 1.1(!).
Honestly, Java has every feature and the kitchen sink in its core APIs. And if a feature isn't there, it's very easy to write a library to add it. That's why programmers like Java so much.
Any other features you'd like me to find for you?
Javascript + Nintendo DSi = DSiCade
How do you explain that Sun provides official Java runtimes for Linux (and for that matter sells Linux boxes) as opposed to Microsoft's complete lack of support for anything except Windows?
Sun has always been much more open than Microsoft. They are also allowing open-source implementations without fear of reprisal. We'll see if Microsoft manages the same tolerance with Mono.
Galileo: "The Earth revolves around the Sun!"
Score: -1 100% Flamebait
An XML Parser and stuff like MD5.
opinion. broken link... poor grammar... this guy is a joke. He pulls out 7 new features!! What about built-in queue support?
Only thing I agree with is generics has been long overdue.
Sun should work on the speed issues if they want Java to be used for anything else than academical and educational programs.
Hey a story written by another real world coder! Hurray for slashdot! This stuff matters to me. I have to code for corporate enterprise environments and HAVE to use the bohemoths for my studios.
Java has always given me the pieces of the puzzle that I have needed where MS languages left off. It is nice to see another vendor meeting the bar. I think now the question is becoming Java OR C# rather than MS augmented by mutterings of java code slipped in here and there to make up for what the MS's failings. Sure all languages will frustrate you in one area or another. It's just not possible to see how somethings will be adapted in the real world until it is actually out there. That is when the language builders stop back and say, hmmm, should have implemented that one differently. Problem has been that MS would never admit that they could have done something better and laughable to even think they would change it even if they did realize it. Java has more work to do, but at least it is getting really close to where they need to be for us corporate coders to look at it seriously as a platform of choice.
Now they just need to work on their web server a bit more.
So, were you trolling, or did you just not bother to keep up with Java?
It is this similarity and 'compatibility' of Java & C# that is now making it easy to port various applications between the two languages. For instance, the very popular Lucene (Information Retrieval library from Jakarta (i.e. Java)) has a very solid .Net port written in C# called dotLucene. The Lucene -> dotLuene port is fairly automated, it appears, which allows developers of the .Net/C# port to keep up with the original software written in Java.
If C#/Java continue in this direction, I think we will see many more applications that have parallel versions in the two languages.
See:
Lucene
dotLucene
Simpy
That should be, "Any other features you'd like me to find for you, dumbfuck?"
Sometimes the truth is arrived at by adding all the little lies together and deducting them from all that is known.
around here we like to call it "an open source circle jerk".
Now, now. Keep it civil. Taking the same route of insults as the original poster is only going to exasperate the situation. Keeping things calm gives him the opportunity to say, "Hey, that's pretty cool! Maybe I'll go try it out."
:-)
His bias does seem obvious, but it never hurts to try.
Javascript + Nintendo DSi = DSiCade
The world was a kinder, more simple place. And "news" didn't get edited after being published.
This problem is the primary reason that C# exists. If the C++ committee had fixed their language, we wouldn't need C#.
It's a big issue for the open source community. The publicly standardized languages have major problems, and the newer languages are controlled by single large vendors.
Sorry, guys but as long as you don't have that, you're not really OO.
In deep, in deep, in the very deep... if you dig a bit... /. maybe not look so bad as a news source.
sign(c14n(envelop(this)), x509)
There are some important limitations of generics in
Java, which are properly addressed in C#.
For more details, you might want to read:
http://www.artima.com/intv/generics.html
C# still has a few extra niceties like properties,
events, delegates, anonymous methods and iterators.
Miguel.
My biggest beef with java right now (well Sun, really) is that they are make design decisions in the name of backward compatibility that are leading to poor design choices. Backwards compatibility is an important consideration, but it should not be used as an excuse to make poor design decisions. I use a variety of java programs day to day that only work with certain VM versions due to bugs, features, etc. It seems silly to give this one aspect such heavy consideration as if the current java versions are perfectly backward compatible today when they clearly are not.
The new generics feature is clearly patterned after C++ templates, but in the name of backwards compatibility Sun chose to implement generics using erasure. This means that a generic type loses all of its type information leading to a alot of issues including broken support for arrays. Using erasure keeps much of the potentially confusing syntax of C++ templates and virtually none of the power.
I suppose I would be less upset if the feature had a different name. Maybe something like AutoCasting (like the name AutoBoxing). "Generics" implies things that the feature does not even try to deliver. Adding true generic programming constructs to java would have been a huge leap forward for the language. Instead we are left with a toy feature that allows you to build type safe containers, nothing more. Very disappointing.
SYS 49152
Hmmm, not sure what you mean by "native". I think it's safe for you to wake up though:
l /parsers/package-summary.html). If sun's parser is not good enough there is DocumentBuilderFactory and SAXParserFactory that allow for integration of any XML parser (Xerces would be one example).u rity/MessageDigest.html)
XML parsers - javax.xml.parsers package (http://java.sun.com/j2se/1.5.0/docs/api/javax/xm
MD5 hash - java.security package (http://java.sun.com/j2se/1.5.0/docs/api/java/sec
Did I just convert you to java?
Quick correction:
The XML APIs were part of a standard extension in 1.3. They were added to the core in 1.4. Also, I found the JavaDocs for 1.1, so here's a link to back up my statement that MD5 support has been around that long.
Javascript + Nintendo DSi = DSiCade
Netcraft confirms: C++ is dying
One more crippling bombshell hit the already beleaguered C++ distribution community when IDC confirmed that C++ market share has dropped yet again, now down to less than a fraction of 1 percent of all programming language distribution versions. Coming on the heels of a recent Netcraft survey which plainly states that C++ has lost more market share, this news serves to reinforce what we've known all along. C++ is collapsing in complete disarray, as fittingly exemplified by falling dead last in a recent programming language distribution study.
You don't need to be a Kreskin to predict C++'s future. The hand writing is on the wall: C++ faces a bleak future. In fact there won't be any future at all for C++ because C++ is dying. Things are looking very bad for C++. As many of us are already aware, C++ continues to lose market share. Red ink flows like a river of blood.
Bloodshed C++ is the most endangered of them all, having lost 93% of its core developers. The sudden and unpleasant departures of long time developers Jordan Hubbard and Mike Smith only serve to underscore the point more clearly. There can no longer be any doubt: C++ is dying.
Let's keep to the facts and look at the numbers.
Bloodshed C++ project leader Theo states that there are 7000 users of Bloodshed C++. How many users of Borland C++ are there? Let's see. The number of Bloodshed C++ versus Borland C++ posts on Usenet is roughly in ratio of 5 to 1. Therefore there are about 7000/5 = 1400 Borland C++ users. Bloodshed C++ posts on Usenet are about half of the volume of Borland C++ posts. Therefore there are about 700 users of Borland C++. A recent article put Bloodshed C++ distribution at about 80 percent of the market. Therefore there are (7000+1400+700)*4 = 36400 Bloodshed C++ users. This is consistent with the number of C++ Usenet posts.
Due to the troubles of half-baked C++ apps, abysmal sales and so on, many development companies is going out of business and will probably be taken over by another company who will sell another troubled product. Now C++ is also dead, its corpse turned over to yet another charnel house.
All major surveys show that C++ has steadily declined in market share. C++ is very sick and its long term survival prospects are very dim. If C++ is to survive at all it will be among dilettante dabblers. C++ continues to decay. Nothing short of a miracle could save it at this point in time. For all practical purposes, C++ is dead.
Fact: C++ is dying
Funny, we were talking about the 1.5 APIs last week here at work, while talking about migrating our apps over from 1.4.x. This site Official Java Programming Documentation gives you a ton to think about. I rem when we were on 1.2...
CB*($#@
free ipod and free gmail!
anyone else hear dueling bangos?
Last time I checked, few industries were doing enterprise development with J2SE, regardless of the version. J2EE is the preferred platform for enterprise application development (hence the 'EE', or 'Enterprise Edition', after the 'J2' bit). J2SE 1.5 is a great release, but it means little currently for J2EE developers.
The new features to Java in version 1.5 are all anticipated and appreciated by the development community, but us J2EE developers won't be able to access these new features in our apps until the official J2EE 1.5 release comes out, and the various app server vendors (IBM, BEA, Oracle, Sun, JBoss, Apache, etc.) support it in their products.
The comparison only lists some baic language features, it makes no any sense! Java is NOT only a lanuage, it's a platform, it's a system, it provides all kinds of solutions for your desktop, network, micro device and enterprise web service.
When you code C# you have memory allocation routines available, thereby making possible malloc errors as MS programmers are want to do. The recent MS jpeg buffer overflow is another example of sloppy C routines! Java classes, on the otherhand are based on the premise that the buffers are a not needed, and the browser should will prevent buffer leaks. The essential difference between the MS way of doing things and the real world is understanding the need for memory security. Sun has always understood this, Microsoft has perverted the interenet with .net stupidity! C# is another attempt by Microsoft to pervert the internet to the extent that only locked down so called "trusted software" will sell. The planned obsolesence scheme created by Gates and Co. is obvious. Too bad so many people do not even realise this bullshit is what MS is all about.
> should be the support it has behind it, in terms
.NET.
.NET Framework ---
> of IDE, tools, api, and longevity of the vendor
Eclipse/IntelliJ/Together
Apache/Tomcat, WebSphere, BEA
RedHat/Suse/Mandrake/Debian
All of these tools and vendors have been around longer than C# and
> pushing it (forget the OpenSource crap argument,
> those guys are too in love with Perl, Python,
> and Ruby - Java could become the child nobody
> wants to talk about if Sun dies) - right now
> that's C# and the
You misspelled "FUD."
In implementation, there should be some syntax to say, I know that this function I called throws a checked exception, but I want it to be unchecked for me. This could be part of the method declaration, or (even better) part of the expression that trips the exception.
The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
I think the problem you are seeing is Ravioli Code; a (perhaps excessive) reaction to spaghetti code. Also Java (and probably C#) programmers seem to take Patterns too seriously as well, patterns should be descriptive, not prescriptive.
In Soviet Russia, /. corrects you!
ITs IEE and ansi certified and used for gnome development via mono. Java is more restrictive in terms of licensing and control.
http://saveie6.com/
No, he probably means like C#'s XML serialization / de-serialization, which is a hell of a lot nicer for most situations than either JAXP/JAXB (I've used all these technologies and I found JAXB so awful (and JAXP is just too much work for most situations) that I wrote my own utility for Java which works very similarly to C#'s XML serialization).
I won't even get into the speed of Java's XML parsers.
There are of course better solutions than JAXP/JAXB for Java (some similar to C#'s), they're just not standard and not quite as nice (in particular, because Java didn't have anything comparable to C#'s attributes until 1.5, and the attributes are quite useful in controlling XML serialization).
"...in my NSHO..." Sheesh, give us a break!
Down With Slashdot BETA!!! I've been around the corner and seen the oliphant; you can only abuse me from your perspecti
...and JVM is an example of bad virtual machine.
Basically, Sun did a bunch of things they could do without changing the VM too much and without breaking old code. But for a bunch of other features, they punted and just added a bit of syntactic sugar to the compiler that makes Java look superficially like it's doing the same thing but is much less efficient under the covers.
For enterprise applications, those differences may not matter much (and they may even be harmful), which is probably why Sun doesn't do anything about them. But for desktop use and application programming, they do matter. Microsoft wanted to create a new language that their legions of C++ programmers could use, and C# is a pretty credible answer for that. Those people don't care about cross-platform features, they care about getting the job done, and if that involves the occasional unsafe module, it doesn't matter to them.
If I am not mistaken MS helped Mono out on their C# implementation.
In the driver arena this the prefered solution to having a closed official impementation. I would assume it is the same for the sake of a language also.
Wow, sent an e-mail as suggested when clicking on "use classic" banner, and got a fast response that addressed my msg
For enterprise-grade work I still prefer J2EE over
You state that .NET development implies having to purchase VS.NET which makes .NET inferior to Java where you can download the SDK for free and a third-party IDE for free. However you completely ignore that the .NET SDK is also freely downloadable and that there are free third-party IDEs, such as SharpDevelop. As such both stand on equal footing despite your FUD attempt.
As for docs, you find it easier to use JavaDoc because that is what you learned. Those who learned MSDN find that much easier. It has little/nothing to do with the completeness or organization of either documentation.
----- You know you have ego issues when you register a domain in your name.
Neither are open source.
.NET platform may be encumbered by a patent, but you don't have to use .NET in order to use C#--there are, in fact, better toolkits and libraries available for C# already.
.NET is not fully supported on Linux and probably never will be. But the C# language is fully supported on Linux, and there are multiple sets of libraries available for it, several of them even cross-platform (Gtk#, wxWindows#, etc.). In fact, C# does not aspire to guarantee the same degree of cross-platform support, and many people view that as an advantage.
Languages can't be "open source", only their implementations can be. Both Java and C# nominally have open source implementations. However, the open source Java implementations may be legally encumbered because Sun owns a lot of intellectual property in Java. The open source C# language implementations conform to an open standard (ECMA/ISO C#), and they seem to be completely unencumbered. The
Despite being marketed as portable, but have portability issues. Java is not backward compatible with older versions. C# has problems with porting some of the graphics stuff to Linux.
You're confusing language and libraries.
We don't really need them. PHP/Perl serve my needs on the web/server side. C++ and Python server my needs on the desktop side.
We need a replacement for C++ because people just don't seem to be able to code safe, secure, reliable applications in it. Java isn't a feasible replacement for C++ because it completely insulates the programmer from the underlying platform. But C# is a plausible successor: it gives programmers access to the underlying platform when they ask for it, but otherwise protects them from accidents.
Hmmm, In a way I'm happy this was placed under "IT" instead of "Developers".
[ Monday is a terrible way to spend one seventh of your life. ]
Welcome to planet earth - we also have a language called 'C++', but it is rather different from what you describe.
Here, we have compilers that can do bounds checking - avoiding buffer overflows, if you decide to use them.
However, the template feature of our C++ is so powerful, that when used together with structs and classes, one can produce beautiful code that is extremely powerful, yet so simple that it is easy to ensure it is not susceptible to said buffer overflows (or memory leaks or the thousand other plagues of much of the software that surrounds us).
This is why there is actually not anything fundamentally wrong with our C++. We are some who want template namespaces though, but outside of little issues (that do have workarounds) like that, the only things we really want is additions to the (already powerful) standard library, the STL.
One problem remains with our C++ though. We live on a planet inhabited mainly by clueless morons, people who do not like to learn, people who refuse to accept that maybe others have seen farther than themselves. This is why we, too, have a lot of problems with software in general - buffer overflows as you mention, among many other problems.
I am sure we can arrange for you to get a copy of our C++ standard - that will allow a clever individual, such as yourself, to write software without the problems we discussed. I would then suggest that we join our efforts, in teaching the unwashed masses how to actually use the language properly, so that we will not have to re-do all software in the world (both ours and yours) by ourselves.
Deal?
Just because C# has more features does NOT make it a better language. Infact most of these Java 1.5 java changes annoy me. You could almost all these things in 1.4 there was just a certain way of doing it. If you have every programmed in C++ before with lots of different people who program things differently you will know that having different ways of doing things can be a VERY bad thing. This is way Java was so strong because there was 1 right way and 1 wrong way. Where in C++ you have like 3 right ways (that don't mesh together) and about 15 wrong ways to do something. Java is simpiler and faster to write code because you don't have 5 or 6 different ways of doing the same thing!
that I dont care which a client wants anymore. Its like asking for 6 of one and a half dozen of the other. I had been afriad of learning Java for ages but knew C# very well. Then I forced myself to learn Java and as soon as I got into it I kept saying "Wow MS copied Sun!"
When you think about it though good OO concepts tend to evlove toward similar goals. Languane and usablitly concepts are the same all around. Its to the point now where the differences between Java and C# are more syntax and available libararies. Ive even been able to easily port Java to C# and vice versa since the languges are so similar.
It has defintaly opened up things more for me, as now I leave it to the client as to what they want. If they are an MS shop then C# is an obvious choice if they use Linux or perfer alternative platforms then Java is obviously what you should build in.
"Don't mess with him, he taunts the happy fun ball."
This actually sounds like a good use of annotations.
The cesspool just got a check and balance.
> like C#'s XML serialization / de-serialization
Well, there's XMLEncoder and XMLDecoder in Java, which handle simple cases really easily. Now to be fair I don't know the first thing about C# XML serialization. Also I've found XMLBeans (an open-source XML parser) to be way way better than JAX* for dealing with just about everything XML related.
And I agree - I think the attributes/metadata will be a big deal for handling XML in future Java endeavors.
Keep your friends close.
Keep your enemies in a little jar on your desk.
So what ideal is java 1.5 aiming towards C++??
Why is having generics MORE OO??
Smalltalk didn't have all this junk and was a better language.
The nice thing about Java was that it didn't have stuff like Generics in it.
More features doesn't necessarily make a language better.
I sincerely apologize for feeding troll. :oD
Sometimes the truth is arrived at by adding all the little lies together and deducting them from all that is known.
I admire C# for the language itself, considered apart from any platform that consumes it. It's just a clean, non-obtrusive language that I'd prefer to use regardless of library or machine.
Of course it's true that in real life you have to consider those issues, but there's something to be said for admiring languages themselves. Heck, just look at Haskell.
Available platforms are mere accidentals of history.
Thank you Mr. Microsoft fanboy. It goes both ways. There are Linux fanboys and there are Windows fanboys. Then there are those of us who actually work for a living and use ALL OSes with each suited to it's task. I work with Windows, Linux, OpenBSD, Solaris, HP-UX, Mac OS X, Tru 64, OpenVMS, Cisco IOS every day. so why don't you fucks shut the hell up and go suck each other's cocks since that's what this is REALLY all about. Meanwhile, the rest of us will get on with the business of doing real work. Fuckers. (Sorry. It had to be said because it's the truth.)
... between Java and C# when you try to find a job with your C# skills. All good paying jobs are in Java and there is a lot more Java jobs than C#. That's a very important factor.
My great OSS projects are done in Java, very few C#.
Still want to code in C#? Well, good luck, you'll need it.
java sucks
No, he probably means like C#'s XML serialization / de-serialization
:-)
You mean, something like Java's XMLEncoder? Nope, Java was still there first. Perhaps you're referring to the way DOM nodes can be queried directly via XPath?
That's certainly a nice feature that's not part of the core. No matter, we've been using libraries like JDom to XPath for quite a long time.
Javascript + Nintendo DSi = DSiCade
Java's primitive types are not objects. There's no reason they couldn't have been (compilers that generated efficient arithmetic code from high level components date back to the '70s) but they're not... which means you have to drop down to C-style types over and over again.
It hinders programming efficiency, and it hinders code efficiency: any place where primitive types can be used, the compiler can infer that primitive code can be generated, any place it can't you'd have had to use object types... but the compiler is MUCH smarter about figuring where casts need to be than average (or even above-average) programmers.
Smalltalk is "OO from the ground up". Java is "OO from the Integer up".
You only use 2% of your DNA
I've looked at most of the posts, and I haven't yet seen someone mention about the pointers and memory allocation that can be used in C#.
This is where Java and C# differ.
Java doesn't have these features and most likely will not have them any time soon.
Of course when using them in C#, you have to label the those areas of code using those features as unsafe.
"Two wrongs don't make a right, but three rights make a left."
"Two wrongs don't make a right. But three rights make a left!" - Cosmo, "The Fairly Odd Parents"
If you count not being able to run the program on any other platform than Windows. With JAVA, you could easily deploy a program for Win, Mac, and Linux.
That he trashes C#/Java for requiring virtual machines, then suggests instead people use PHP/Perl... both of which are interpreted languages.
...
What?
Irritable, left-wing and possibly humorous bumper stickers and t-shirts
That kind of "article" is somewhat funny on April 1st, but seriously I see no point in posting that here and now.
This looks like a bad joke, and a total lack of regard for the above average intellect of Slashdot readers.
It's good to use your head, but not as a battering ram.
Well people are here now saying oh java is better and people are saying that c# is better. In my opinion both are good and just like competition should do (assuming MS plays by the rules this time) both products will end up the better because of it. For the longest time java had no real competition (in my opinion) and its development slowed down greatly but now that C# is starting to be used more and more often javas development has finally started to take off again. Nothing but good can come from this so rather than flame each other over this I think we should simply consider what features might improve either language and attempt to talk to communicate with the developers when possible to request these features and improve competition all around.
While offtopic, this is easily the most interesting comment in this story. Thank you.
You can freely download Java 1.5/Java 5 for no charge. It's available now.
There's also Nant, which implements the Ant build system, and Nunit, which is a .net implementation of the Junit java unit testing framework. I'l still sticking with Java though because I get to use Eclipse and Resin. It doesn't hurt that all these open source packages come out for Java first either.
I'm curious, why do we still get buffer overflows in C++ code? I mean, the C++ string type and the vector container have been around for the better part of a decade now, and a standard part of the language for, what, six years? Seven years? And you can grab smart pointers from boost.
Widespread support for the STL-- meaning standard support, meaning your code's portable, not meaning "it works sort of similar as with the other compilers"-- was really, really slow in coming, and didn't really become universal until, well.. after Java.
Meanwhile very, very little of the associated literature for C++ really covers the STL. Many introductory C++ texts don't even indicate the STL's existence outside of cout, and I've never, ever seen any sort of teaching institution use a text for learning C++ that introduced things like STL strings and vectors immediately as something that coders should be using as soon as they know what strings and arrays are. If the STL is introduced by C++ textbooks at all it's introduced very late, as an "oh you can do this as well" sort of thing, after the reader's already become accustomed to using C strings and arrays.
As a result the "standard" C++ classes never really caught on as such. When people use C++ generally either they're locked entirely in to some vendor's APIs, or they're just doing C programming with classes. Most C++ libraries you'll come across will expect data passed to them as a C string or a C array or some kind of library-specifc homerolled string/vector class-- which doesn't particularly encourage developers to use the STL container classes since they'll just have to convert them to some other format in order to interoperate with anyone else.
I think basically the problem here is that even after all these years C++ just doesn't have a standard class library. It does have a class library that's endorsed by the C++ standards body, and you can claim that's the same thing if you like. But I'm not sure I'd agree.
Irritable, left-wing and possibly humorous bumper stickers and t-shirts
Does Java have it or a similiar feature? If not, then it still has a way to go to catch up.
The java generics system just saves typing and ensures type-safety for collections. But it does nothing about the problem of excessive boxing and unboxing that plagued java collection classes from 1.0 on.
For example if you have an ArrayList<Integer> in java, it internally uses an object[] to store the elements of the array. So everytime you write a new value to the ArrayList<Integer> by e.g. calling list.Add(i), a new object is allocated on the heap.
A List<int> in C# on the other hand uses an int[] internally, so adding or changing an element in the List<int> will result in no boxing/unboxing at all. A List will be just as fast as an int[] since the indexer method will be inlined.
The performance difference is dramatic: try creating an ArrayList<Integer>/List<int> and filling it with 1000000 numbers. The C# code will run 10 to 20 times faster, while the java version will use 20 bytes per Integer instead of 4 bytes per Integer like the C# version.
I am currently not at home, but if somebody is interested I will post a benchmark later.
Private property is the central institution of a free society (David Friedman)
Yeah, there's a syntax for this. It's called "put the try and catch in the function, with an empty catch block, and a comment that indicates why the exception can't happen." Then your function doesn't have to be declared as throwing an exception, and someone who looks at your code will understand that you didn't just eat the exception for no reason.
And, before you whine about having to write the try/catch block, let me echo what somebody else said, that an IDE like IntelliJ will do it all for you (except for the comment).
Java is free, MS VS Express products wont be.
The Internet is full. Go Away!!!
> Generics improve testability because they
> largely eliminate runtime ClassCastExceptions.
Depends on the implementation. Your statement is correct for C# generics, but not for java generics.
Java generics are just syntactic shugar, they do *NOT* eliminate runtime ClassCastException.
Furthermore java generics are not visible via reflection for example.
Regardless of what Microsoft and/or Sun says, you can always USE WHATEVER LANGUAGE YOU WANT
I can't think of a single "standard" that isn't controlled by some weird committee.
I'm schizophrenic; no I'm not.
Oh, how I pine for the days of vi vs. Emacs.
You must have meant, of course mutt.
www.vanheusden.com - home of Multitail, HTTPing, CoffeeSaint, EntropyBroker, rsstail, bsod, listener, nagcon, nagi
Java has had a way to write "unsafe" code from day 1.2. It's called JNI. Write your unsafe code in an unsafe language and hook it in with a dll.
Just when i start reading /. for a few days again, i'm reminded why it's so easy to drift........ away......
Testability is the ability to test. It has nothing to do with the preponderance or lack of ClassCastExceptions.
How many ClassCastExceptions have you had to deal with in Java anyway?
It is very very very rare in the code I've had to deal with.
Hacking all the bloody libraries and complicating all the code is not a way to make your code reliable.
It was a marketing decision. Pure and simple. Because there are a lot of simple minded developers (or those without a formal University education) that think that more language features automatically means better.
There wrong.. see C++ for evidence.
I have a couple of rules when regarding languages:
.NET and C#). And just when you get used to version XYZ, they come out with XYZ+1 which changes EVERYTHING. Sorry, I don't need my code to die at the whims of MS.
1. Does it have wide industry support or is it merely another "we ship it until we kill it" single-sourced language.
2. Does the name sound like it could hurt you?
C# pretty much fills the bill (no pun intended) for both 1 and 2.
MS is no stranger to introducing something and then killing it some time later (hence my avoidance of both
Then there is the whole "C#" name which, frankly, I think sounds retarded. To most Americans, the '#' symbol is pronounced "pound". Few people I know call it a "sharp" (actually, NO ONE that I know calls it that).
Finally, just the sound of it sounds dangerous and, if inserted in the wrong place (like my MIND) could cause harm.
IANAL, but I've seen actors play them on TV
dom4j vs. jdom, the vi vs. emacs of the Pepsi generation ;-)
Waltz, nymph, for quick jigs vex Bud.
I don't code much for living, but I managed some projects, and programmers. But I put a list of priorities in a project. The most important thing for me in a project? RELIABILITY. Because it's cheaper for me and the client. I don't want to spend my time fixing things that shouldn't be fixed. So therefore, NON-PORTABILITY to ROBUST PLATAFORMS(UNIX etc) other than windows in C#, makes JAVA a superior language. I don't care if I code in C# in 20% less lines than JAVA(and that isn't true), running only in windows make it an option that I just can't accept. I hate both languages, C# and JAVA, both are slow, and resource hungry, but a never will put reliability, portability, in front of ease of use. So let's bring back VB? Maybe VB is C#... you know.
I've done enterprise-level Java and C# implementations for financial institutions, and reckon there is one thing that people always miss when comparing the two languages: installation.
C#, despite any other flaws, Just Works(tm). Install Visual Studio, write some code, click the run button. Sure it takes a bit of thinking to get a n-tier implementation up and running properly, but the installation of the back-end stuff (IIS, db connections, remoting) is incredibly simple.
On the other hand, to get enterprise Java (J2EE, although some would argue that a class library is easier and more versatile), you need to learn how to install an app server (JBoss, Orion, or god forbid WebSphere), and how to configure that system for database connections, performance, session and object permanence, etc..
None of this really matters in a 'big-iron' enterprise environment, because there's room to hire a websphere monkey to look after the cat-herding. In anything below a mega-corp or mega-bank however, the overhead of running Java can sometimes be a burden that developers just don't want to think about.
I see it kinda like using Firefox over IE. They both do pretty much the same thing, and one does it 'better', but at the same time requires some effort to implement. Some people just can't be bothered with the effort.
gadgetophile.com
it's Microsoft.
The Truth About Slashdot
Osama bin Laden has been captured!
That's all well and good.. but I would've been much happier if they had unsigned types. I mean, who invents a new language, touts it as the be-all-and-end-all, yet doesn't offer unsigned types?
Sigh, I'm going out for some Glühwein.
B: de-da-dee-da-dee-da-dee-da-dee.
A: de-dum-di-di-dum-dee-dee-da-dee.
B: de-dum-di-di-dum-dee-dee-da-dee.
A: dim-dum-diddle-y-dum-di-da-dum.
B: Monkey Island III van Halen track.
You don't need VS to write .NET applications. The compilers come with the framework, which is free, once you pay for the OS.
You're comparing the wrong things though.
The Java SDK and compiler are free. The .net SDK and compiler are free.
Visual Studio, the editing environment isn't, but provided you can write a make file (well, sorta) you're sorted. Of course there's always Sharp Develop if you must have a free IDE
I'm talking about cases where you cannot prove that the exception won't happen, so your technique (which I'm sure you are not recommending for those cases) would be reckless. It is actually rare that you can prove a checked exception won't happen, either because it is impossible in principle (eg FileNotFound), or because the specification doesn't guarantee the exact conditions in which it may be thrown.
The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
Sometime in 1999 after I'd worked at Sun for about a year, a routine all-hands meeting was held for all of the Java Software division. JDK 1.1.8 was the current version of Java on the street and JDK 1.2 was in the works, almost ready for release. We sat there and listened to the usual rah-rah speaches from the divison's head honcho (can't recall who it was at the time), and then he introduced us to a marketing guy to tell us about the launch for JDK 1.2. As he begun talking he displayed a new slide on the project and it read, in all its powerpoint glory, 'Java 2000!' And he went on to say that the new JDK would be called, not Java 2, but Java 2000. Everyone in the audience started laughing hysterically. We all thought it was a big joke. I mean, Microsoft was on the verge of releasing Windows 2000, so you don't really mean.... Turns out this marketing guy didn't have much of a sense of humor. "I'm not joking", he said. The laughs and knee slappings turned into boos and hisses. Head honcho guy says something like the marketing guys have worked hard on this and that's the name they've choosen. The Q&A session was next and, boy, did both of these guys get an earful! Anyway, I can't say for sure, but I think that had it not been for the outrage and disbelief at that all-hands we'd be stuck with even weirder Java naming convenstions today.
Rich
It doesn't matter because you can get VS Express for free (which allows you to write C# 2.0 code), and eventually C# 2.0 _will_ be released for free. You can just use the free VS Express to tide you over until then.
Static Import, actually promotes bad coding habits IMHO
Ever seen bogus base classes or interfaces used to declare a bunch of constants? Those guys apparently missed static imports badly, if only to make their bad habits a bit more elegant.
Bad coding is possible in every language.
My exception safety is -fno-exceptions.
Seems related to my favorite pet peeve in OOP.
Spaghetti programming techniques can be reimplemented with a vengeance using matryoshka techniques (named after those Russian nested dolls).
This kind of programming does violate XP tenets suggesting that interfaces should be kept shallow. Methods that reach back into the third nested doll make me just cringe.
It's like spaghetti that wasn't properly rinsed and starts sticking together together...
"Provided by the management for your protection."
Well, the safety problems are largely a result of having raw pointers in the language, which you can't really "fix". Major, backward-compatibility changes just ain't going to happen, and rightly so. There's room for a new language in the C++ space, but it will have to be just that: a new language.
My personal gripes:
- Being near-impossible to parse correctly and efficiently. Which mostly means the preprocessor, but also name lookup rules, template POI rules etc. This is why the state of C++ tooling is so dire; our IDEs are a sad joke compared to what's available for Java.
- Weak standard library. (cries of "Heresy! Burn him! Burn him!") Yes, the STL is terribly terribly clever, and elegant, and impressive. It's just not terribly useful. Most people use iostreams, vector, list, map, string and not much else. How often have you needed to stable_partition a deque? Compared to, say, needing to portably list the contents of a directory?
- As you say, obsession with templates. The original standard library was bad enough; std::string did not need to be templated, nor did the iostream library. The current metaprogramming craze has made things even worse; it's great as an intellectual challenge, and to discover through experiment which areas need better language support (*cough*typeof*cough*). But not for everyday production code. It's hard to maintain, hard to diagnose when it breaks, and multiplies compile times by orders of magnitude. Trying to do agile development in C++ is a painful experience at the best of times; when it takes MINUTES to compile a five-line file, it's flat-out impossible.
That said, there are still areas in which C++ beats everything else out there:
- Control. It's the only mainstream general-purpose language that supports deterministic destruction and RAII. The importance of this cannot be overstated. GC is all very well, but given the choice between leaking memory and leaking file handles, or DB connections, or mutexes, I know which way I'd go. Similarly, GC pauses still rule out Java/C# for many realtime apps, even soft RT.
- Programming-in-the-large. In my experience, a single C++ source file takes much longer to compile than a single Java or C# file. But a large C++ system can be incrementally rebuilt after a change to one (non-header) file much faster than a Java/C# system. Header files are a repulsive kludge and a royal pain, but they're there for a reason.
Religion: Which is the One True Faith?
(Stolen from snpp.com)
"I want C# on my *N*X/Window box"
http://www.go-mono.com/
"I want Windows.Forms support on my Mac/*N*X/Windows box"
http://www.dotgnu.org
If it's a choice of language based solely on the portablity of code, C# wins out IMHO. With Java, you're dependant on Sun to support your system, which is a royal pain. (as anyone with a *BSD box will tell you)
The thread is hardly over. Visual Studio is one of the few applications Microsoft has released that I actually like. I still use VS6 at home, and I use VS.net at work. As another poster said, the debugging in Visual Studio is awesome. The two debuggers I use are visual studio in windows and gdb in linux. Gdb is powerful but, being text-based, isn't nearly as pleasant to use as visual studio's GUI debugger. Visual Studio's intellisense and auto-formatting also do what I want them to do, and I have yet to find an IDE in linux that "just works" the way visual studio does.
Microsoft IS evil, but Visual Studio is nice, and it is being developed by some very smart people.
You can see C# 2.0 for free in its beta form right now. Go to msdn.microsoft.com, search for .NET 2.0.
That's what I'm saying.
VS Express _Beta_ is free. The released product will cost money. Microsoft has said that it will be cheap, but VS Express 2005 _will_ cost money.
The Internet is full. Go Away!!!
So if you're doing C# and your foundations in OOP are rock-solid, there really isn't any difference whether you're coding C# or Java."
.NET API or vice versa than to learn a few simple language syntax differences.
Yeah, except the entire API!
At least for me, it takes far longer time to learn and adapt to Microsoft's
Beware: In C++, your friends can see your privates!
I'm still faithful to C++ (just upgraded to Microsoft Visual C++ .Net 2003 Standard Edition) and I'm wondering what the differenes between C++, C++ .Net and C# are?
No, he's wrong. The Java 1.5 compiler stores the generic type attributes in the class file in what are called "Signature attributes". Generic types are perfectly safe across compilation boundaries. Where they aren't safe is when they are combined with raw types. That behavior is by design, and it is the tradeoff paid for having mostly seamless compatibility with an existing codebase. Whether that was an appropriate decision is an entirely different discussion.
For all those who keep saying java is dying, Unix is dying, and mainframes are dying. Fact is, they aren't dying. Are the roles changing? Well yeah! Nothing ever stays the same and things will always change.
A professional developer should always think about the needs of the clients first. that means using C# and .NET if they are a Microsoft centric shop. It also means being up front and honest about everything. No one language is perfect and no one platform will ever be perfect. Most of the platforms today are sufficient for the majority of the businesses. Blindly believing marketing and PR material is both retarded and silly. Languages and programming shouldn't be a religion. It's a tool god damn it.
If you aren't willing to spend the time to learn the tool, freaking get out of the IT industry so the rest of us can focus on getting work done. </rant>
I know that Paul Graham has said some seemingly negative stuff directed towards Java but get over it. Why include him in the initial post here? There are a lot of well known people that do not or refuse to use Java but do you single them out? Being petty certainly will not help your cause.
And oh yeah, Lisp RULEZ!!!!!!
SQLServer is about the same price as Oracle these days--- either per named user or CPU. Depending on your application, neither of them is anything like 'cheap'. So, yeah, not supporting other DBs is a big drawback.
You mean, I have to buy it first before I can even try it?
I can get JSDK 1.5 and J2EE and a great IDE in Eclipse all for free. Heck, I can even download a free version of JBuilder. Why should I pay for C# when I don't even know if I like it yet?
Sam
One thing that makes me nuts in C# is its lack of compile-time enforcment of Exception handling. When I made the switch from C++ to Java, I fell in love with Java's compile-time checks for appropriate try/catch blocks.
In my C# development over the past year, I've been repeatedly frustrated by exceptions popping up in unexpected catch blocks because they were thrown and not caught deep down in the bowels of my code.
To me, that's more or less a deal-breaker in choosing C# for large-scale development. Unless developers are exceptionally disciplined (and that's hard to guarantee across a large/distributed team), lack of compile-time enforcement limits Exceptions' usefulness.
I too would love a Java 2.0 (no, not Java2 1.2) where we break backwards compatibility and toss out the old crap. It should probably come with a 1.x jvm to mkae the transition easier but it would at least provide a path to a scaled down API. I think after 4 years of 1.x and 2.x the 1.x could be dropped with little ill effects (even today's x86 aren't compatible with the 8088). And yes I do know what deprecated code is and how that works.
Your CPU is not doing anything else, at least do something.
Before I found out it was 'C Sharp' I thought it was 'C Number'.
Is this a joke?!? There is ***NO SINGLE BENEFIT*** in using C#! Since the nature of it is proprietary, there is virtually ***NO REASON*** to use it.
So, stop blabbering about comparison, there could hardly be any, we are talking about Windows toy-platform here. I was once a Microsoft developer (gizz what a horror), and pray not to be forced to do it again.
This, BTW, is why you don't want your language to be controled by a company which in turn has a marketing-driven bottom-line.
I can't decide if you are talking about C# (true if so) or Java.
If Java, then your argument has no merit - as Sun does not control what goes in the language, and has not for some time. That is decided by the JCP, Java Community Process - a board of people from LOTS of different companies (like IBM).
If Sun controlled Java Generics would have been in 1.4 already. They have been around in the wings for a LONG time now.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
My facts are perfectly accurate; what you wrote does not contradict what I wrote.
Your original post proclaimed Java must declare exceptions, which is false. How is it not false?
I agree that unechecked exceptions are the way to go for projects of any size, and have been using them in Java for years now.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Care to name that 1.3 only IDE and those numerous API changes?
As other posters have said, I don't think that C# is meant for big enterprise apps, but littler 'toy' apps. Still, you'd be surprised how many of such apps are in use right now. The biggest strengths of C# are:
.NET, so that a user can program to a higher level library. Documentation is all there. It also provides all of the tools and files needed in one tidy install, without the need for combining different packages. It all comes from one vendor, and it's easy to get your mind around.
1)Simplicity. Everyone loves to argue about how purists should code things, but in the real world, a lot of code is written by people who are blissfully ignorant of theory. VS allows them to make obvious progress, reusability be damned. A crude, but working app is more impressive to a clueless manager than a collection of nascent classes.
2)Integration. This goes along with #1. Much of the heavy lifting in creating desktop apps is rolled into
3)ASP.NET. I would argue that ASP.NET is the easiest way to accomplish application-like behavior in a web site. Session state works well, database access is a couple lines of code, and you can even draw the page on a coordinate system if HTML stymies you. Scorn it if you must, but it's a good step toward standardizing web/application development.
As Stroustrup says of the ellipsis construct in C++, "The most common use of the ellipsis is to specify an interface to C library functions that were defined before C++ provided alternatives", and gives an example of the "extra work that face[s] the programmer once type checking has been suppressed using the ellipsis." Using the ellipsis construct, other than where it has to be used to access some legacy C library, is definitely very poor style in C++.
How about Double Duh? For...Each goes back to when Visual Basic still had version numbers, as opposed to .NET release years and product names, and C# wasn't even a gleam in Bill's eye.
"It's the height of ridiculousness to say for those 9 lines you get hundreds of millions."
Catching an exception that can't happen IS reckless, agreed. Sometimes you want these out-of-the-blue exceptions to go higher up in the app and be logged 8-levels up. If so, you should not have to keep passing them off like a bucket-brigade. This is why checked exceptions are a failed attempt. Syntax should not be neccessary to ditch them though, we need java in the next version to DROP them altogether! Features designed to stiffle programmers that do not in themselves produce benefit often restrain actual development without addign safety. Many people write empty catch blocks and should instead write adapters to convert exceptions to subclasses of RuntimeException...
http://blogs.msdn.com/cyrusn/archive/2004/10/11/24 0673.aspx
Then tell me how much you want to push C# to production.
Neither of the languages holds a candle to Common Lisp or Prolog.
What really sucks is people who write [Java|C#|C++|Lisp|...] programs that run slower than shell scripts because they get lost in a twisty maze of inherited methods and end up with their view object having a method that forces a refresh of a list of objects in a box that ends up calling that method on the original object unless the object's position hasn't changed, so every time you resize the box it does a very slow and painful iterative balancing act to get the layout right... but they never notice because they're developing it on a 3 GHz Pentium IV...
Not that I'm bitter or anything, I just want an object system that includes a mandatory test on a Pentium 100 before the packaging tool will link it in with the production runtime. If it also involves painful but not dangerous voltages applied to sensitive organs if they try to skip this step it'd be a bonus.
The included libraries will make/break a language, and right now, the .NET libraries are much easier to use. Partly because they were designed "as a whole" and don't have a lot of cruft in them (yet). And partly because the MS on-line help is vastly superior to JDoc (does Sun not believe in code samples?).
.NET framework is that 90% of it uses concrete implementations. Because they didn't use an Interface-driven design, they now have to fall back on the Win32 style of appending "-ex" to class names when they want to improve them, rather than letting a dynamic loader find the class the developer needs.
The biggest weakness I see in the
Even so, the Visual Studio IDE is so far ahead of any of the Java IDEs (Eclipse comes closest), that it's probably Microsoft's single best competitive advantage.
Chip H.
I'll stick with my assembler and linker.
Foo-foo bloat language drunkards...
C# is just one option for .NET eh?
Hmm... if only there were some other languages that could be compiled to JVM bytecode.
Anyone?
as seen on /. :
.jar .jar /bin"
-"Yes, some things are just way more scary than Java the Hut." (typo or something)
-"Like what? C# the Hut?"
-"That character from Episode 1.0 is scary, you know,
Looking at your other posts, kfg, I figure this post is actually on topic.
:D
:)
What he means is that out of Java and C# he cares for neither of them and cares even less about what happens to them. That explains his little analogy
Am I right, do I win a prize?
Seeing as it could well be the best informed post in the entire article's comment mishmash.
Also, I had no idea that Java had enums. Care to elaborate? All I've seen so far has been a bunch of "public static final int"s in a class, and those are a pain in the ass to deal with.
Any other features you'd like me to find for you?
Yes, where do I find the "don't suck" feature?
I'm kidding...
DISCLAIMER: I develop heavily in both C# and Java, more C# than Java, about 80% C#, 20% Java, not by choice but based on client demands.
.NET, though, is that the libraries seem to be more consistent, whereas the Java APIs have evloved and been added to by different developers using diffferent programming styles and approaches to patterns, each package seems to implement different programming styles and constructs, but you get used to it after a while. Plus, Java has so much deprecated code, they need to clean those out once and for all and clean up the APIs, see this for more details of what I'm talking about.
I don't think it's fair to compare Java 1.5 (released) vs. C# 2.0 (beta, who knows when it'll actually be released). That's like comparing Linux to Longhorn.
And re: IDEs, while programming so much in VS.NET, I missed all of the cool features of my IDEA IntelliJ Java IDE that I was excited to buy ReSharper, bringing some of IDEA's cool features to VS.NET.
One of the main things I like about
I thing this is good for the coders out there who can take advantage of these improvments in both the languages.
Anyone who has heard of Glenn Rowe, thats his opinion too and he doesn't hide it :P
All spelling mistakes are due to solar flares...honest
where do I find the "don't suck" feature?
Found it!
From hell's heart I fstab at /dev/hdc
Say Amen!
Just because operator overloading can be used for evil is no reason to throw the baby out with the bathwater.
Java lacks a Currency class, so I wrote a Money class some time ago that I use for common financial calculations, and it takes care of the pesky problem (and newbie mistake) of using floating point types for money.
BUT, in Java, you have to have add(), sub(), mult(), and div() methods. Reading RPN style caclulations consisting of sequenced and nested method calls instead of algebraic operators is painful. Operator overloading is wonderful in those cases.
Operator overloading certainly can be evil: What does it mean to increment an Employee? Do I really want to know? But for new types that you can actually do algebra with, it is quite helpful.
And there are other cases.
In my C++ days I wrote a FileHash class that kept an index of offsets to the start of each text line in a text file. Then I overloaded the array subscript operator so that a text file could used like an array of char pointers (or a String class if you liked). That was a perfectly good use of overloading.
Moreover I think overloading the array subscript on ordered collections also makes perfect sense.
I often wish Java had this feature. I agree with every simplifying choice they made except this one.
Am I right. . .
.do I win a prize?
Yes. I guess I need to start using Zen tags or something.
. .
Absolutely. You win an hour, all expenses paid by you, in beautiful, downtown Troy, NY.
Second prize is two hours in Troy.
KFG
While offtopic. . .
.this is easily the most interesting comment in this story. Thank you.
See above.
. .
You're welcome. That entitles you to second prize, as per above. My condolences.
KFG
OK, and what I'm saying is that you don't NEED VS Express to write C# 2.0 code (you only need it for now because that's the only thing shipping with a C# 2.0 compiler at the moment). Soon enough, C# 2.0 proper will be released FOR FREE, including its own compiler.
Hence, it doesn't matter if VS Express someday costs money. You can still code C# 2.0 for free.
So when do we get a J2EE upgrade to the new API? I figured that would be a more important question.
Like CNN and the other news outlets are "fair and balanced"? Fox news makes a concerted effort to be fair by giving both sides equal "fair" air time. This is something most other agencies fail to even attempt unless the equal airtime is positive for the left and negative for the right. You pick on Fox because unlike the rest of the media it doesn't spew out only the news that fits your beliefs. Just because it isn't what you believe doesn't make it incorrect. Nor does it make it slanted.
Open your eyes and pay attention to wording. Most telivised media will word things or omit words in such a way as to mislead and slant towards one side. If you take off your blinders you will notice that most outlets have slant and of those more then not are to the left.
.Not is nothing more than COM /Activex full of bugs, buffer over flow and security nitemare. .Not scalability is like VB.
C is too low
Java too slow
Fortran is... well, Fortan
C# has mono
Perl has gono(rrhea)
None can do what C++ can!
SexyFingers: So if you're doing C# and your foundations in OOP are rock-solid, there really isn't any difference whether you're coding C# or Java.
GCP (122438): And I was a member of one of the JCP expert groups that brought you Java 5.
The single biggest disadvantage of Java is that it is inherently 32-bit in nature, and is utterly unsuited for use in the emerging 64-bit marketplace [x86-64, anyone?].
For instance, the following code will NOT compile [or "javac", or whatever you want to call it] in Java 1.5:
Java is a language designed to run on the hardware of the 1980's. C# is a language designed to run on the hardware of the next two decades.For this reason alone, I cannot recommend that any new project start from the ground up with an obsolete 32-bit language like Java. [Obviously existing projects may need to remain mired in an obsolete language, owing to the inertia of legacy code.]
Shouldn't this be under "Developers" not IT. Believe it or not, more then just it people use these two languages. Well, im not sure about C#, but I am certian about java.
I'm a good cook. I'm a fantastic eater. - Steven Brust
I like both Java and C# from a language perspective, however, working for a large company, I would recommend Java over MS's .Net. Java has been _very_ stable and _SECURE_ while the .Net security holes have already started at only version 1.1. We also appreciated the fact that we were able to switch our Java server apps to Linux over Solaris, we could even use MS Windows if we wanted to for our Java app servers; we don't have that same choice or luxury with MS .Net.
If Tyranny and Oppression come to this land,
it will be in the guise of fighting a foreign enemy. -James Madison
this guy wrote an interesting list.
read the 101 reasons
here
There are 3 parts to a language:
1. The syntax
2. The type system
3. The evaluation model
All 3 parts of C# are based on Java, not Delphi. Let me break it down:
1. Syntax: there are two main styles of syntax, Pascal and C. Delphi is Pascal based, while Java is C based. From C, the object oriented constructs have been added in different styles: there's C++ style, and there's Java style (and there are others). C# is Java based.
2. Type system: the Java language made some unique design decisions for their type system: interfaces (which C# copied), a distinction between primitive and reference types (perhaps a mistake, but nevertheless which C# copied and provided a workaround in the form of autoboxing), covariant array types (a mistake! which C# also copied!), and types indexed by name and class loader (which C# copied).
3. Evaluation model: the core ideas were again copied from Java to C#. In particular, Java's evaluation model restricted the language to single inheritance, and C# decided to follow Java's lead and do the same thing. Java's class loaders, perhaps Java's best feature, which allow dynamic loading of new code in a type safe way, was also copied into C#. And this is what gives it away. More than syntax, or virtual machines, or libraries, this is the one feature that sets Java apart from any other language. Well, apart from C#, of course, which copied class loaders from Java.
Now, maybe someone else can help me out here, but I also have a sneaking suspicion that C# also uses a constant pool per class file, and has pretty much the same class loading algorithm and method dispatch algorithm.
Last time I checked, it looked like the C# and Java syntax were identical for the hello world program, except for the different way to declare the package/namespace of the class, and the fact that C# uses an uppercase "M" for its main method instead of java's lowercase "m". Other than that, the same program would compile in both languages. The basic class declaration syntax and method declaration syntax is the same, down to the public static void main(...) {}. The modifiers are the same. Certainly it wouldn't take much to make a largish Java program compile under the C# compiler.
Since the two languages have striking similarities, one wonders when people will begin to develop source code translators to shield problem-oriented developers from the idiosyncrac differences between the two languages.
For instance, ISI's STELLA is a LISP dialect which compiles to Common LISP, C++ and Java(R). Along the same line, it would be nice to have a compiler for a "JaC#" language that compiles to both, utilising tons of Java APIs and C#'s ability to do native compilation (I am aware there are portability limits, but I'd much rather be able to be confined to a common subset while able to easily move between the C++/Java/C# worlds than using obscure language features that others can't decipher anyway).
--
Try Nuggets , our mobile answer search engine. We answer your questions via SMS, across the UK.
First, two sugar languages, Boo and Groovy. Then three other: Scala for JVM, Nemerle for MSIL and Felix (sourcefore) against C++. Is it a new program paradigm apearing?
I'm still praying that Java survives.
In C++ the decision whether or not to make use of exceptions is hard to make. If you don't use exceptions, the results of many function calls have to be checks, which is considerably more of a hassle than Java. If exceptions are used, writing exception-safe code is really quite limiting (It often means significantly more little objects when "new" can't be used freely, and much of the existing code have to be rewritten, and I hate comments like "func() can't throw, so this is safe"). Seems that an garbage-collecting language like Java/C# is very helpful if one want to use exceptions.
Your response to my post, sir, is the sanest that I've read.
BTW, the article says something like "Then it doesn't matter if you code in C# or Java."
When did they port C# to Linux, BSD, OSX, VxWorks, Symbian, etc, etc?
Pure and utter FUD
m icrosoft-deliver-64-bin-dotnet/view
.NET for 64-bit Windows 2003. Infoworld in a recent analysis explains:
.Net Framework means that the hard work many Windows developers have put into migrating to the .Net development model is for naught on Windows on Itanium.
from http://www.manageability.org/blog/stuff/why-cant-
Despite having a research and development budget that is almost 7 billion dollars a year, Microsoft apparently can't deliver
The lack of a 64-bit implementation of the
In the meantime, IT shops that wish to employ 64-bit Windows as an application server or Web services platform will be forced to revert to the older, Windows DNA (Distributed Internet Applications) environment.
In stark contrast, BEA Systems and Sun have been shipping JRockit and J2SE with Itanium support ever since JDK 1.4.1 was released. Furthermore, according to the reports 64-bit Opteron support is expected at the same time JDK 1.5 is released.
So exactly like add*Listener and remove*Listener methods, just with different syntax.
Karma: It's all a bunch of tree-huggin' hippy crap!
Those certifications do not prevent it being patent encumbered.
There is a VIM Emulator Plugin for IntelliJ IDEA.
There is also a Vi Plugin for Eclipse.
Also, KDevelop has happily embedded KVim for ages now.
Is that enough?
Karma: It's all a bunch of tree-huggin' hippy crap!
Java vs C# wars is like watching two fleas fight over who owns the dogs back. Or for the immature /. readers, Its watching two script kiddies fighting ownership over the same honeypot
I forget which movie thats from, but props to the person who wrote it.
Neither language is right or wrong. Both are subject to the whims of MS and Sun. Neither is ANSI so you will never see different vendors (Borland, Watcom, Lattice etc) compete. Neither language grows outside of the CPU scope of the chosen VM platform.
Answer one question to yourself. Will the language grow with me as the hardware changes? Will I have a job twenty years from now?
Enjoy
It's just the normal noises in here.
There is not enough innovation either in C# nor in Java, and what is there is often not implemented in the best possible way.
Generics (C# 2.0 already supports this)
Both Java and C# generic are quite limited, compared to C++ templates. And they are easier to use with expression reduction, since you can give them a nice-to-use form.
Enhanced For-Loop (the foreach construct in C# 1.0, duh!)
It is much better if you can define your own for loops, as in XL.
Autoboxing/Unboxing (C# 1.0 already has this, everything is an object, even the primitives - not really, but they do it so well...)
Autoboxing means you have boxing in the first place, which means your language doesn't support stack object. Nothing to be proud of. And _auto_boxing is only a form of implicit conversion. In XL, any implicit conversion can be implemented using expression reduction.
Typesafe Enums (again C# 1.0 already implemented this, but I think they've added a little bit more twist in Java, that its actually a better implementation)
Ooooh! Enums! Innovation!
Varargs (C# 1.0's params construct, ellipsis construct in C++)
Still no type-safe, instantiation based varargs.
Static Import (I don't know if C# 1.0 has this, or C#2.0, but C# has a construct for aliasing your imports - which is way cooler. Static Import, actually promotes bad coding habits IMHO)
Yes. (XL had import aliasing for a while, see examples above...)
Metadata/Annotations (this is C# 1.0's Attributes, Sun's upturned noses just gave it a fancier name - also, C#'s implementation is better and more intuitive)
What you really want is metaprogramming, to actually enhance the language as you go.
-- Did you try Tao3D? http://tao3d.sourceforge.net
Both java and C# haven't invented anything new, all the features has been in other languages already (C++, smalltalk, ...).
I wouldn't personally use C# for anything serious. C# compilers and virtual machines are way too new to they to be really stable and mature.
Java has been here ~ 10 years and only now I think it really works and computers are starting to be fast enough for it to be useful as real (versus toy) language.
I'm still using C/C++ for doing most of the serious stuff because of performance. I don't want to say C++ is better than Java. This is relative because it depends how on coders skills and how well software needs to be optimized. IMHO with ASM/C/C++ you can always get the best performance if you are willing to spend much time on optimizing your code. With Java you can get quite good performance by using very little time on optimizations.
I have much experience in C/C++/ASM and I don't know Java so well that I could get nearly same performance from it. I code CPU intensive programs (scientific computing) which needs to be well optimized.
Folks, this really isn't that hard. If an exception is supposed to be impossible to trigger, then just propagate it to the caller like this:
try
{
doSomething();
}
catch (ImpossibleCheckedException ex)
{
throw new RuntimeException("This is impossible", ex);
}
Note the ",ex". That was added in JDK 1.4. It allows you to later retrieve the original exception from the "wrapping" exception.
With the above code, if the impossible exception actually occurs for some reason (because you made a coding error), the exception gets propagated up the call stack encased in a RuntimeException, which is unchecked. At the top of the call stack, you can, if you like, catch all the RuntimeExceptions, call their 'getCause()' methods to retrieve any possible ImpossibleExceptions or others stored within it, and do whatever you like with them (including rethrowing them). Or just print them out and exit, which is what is most commonly done.
In any case, please don't just catch and ignore an exception that you weren't expecting. This hides errors, and makes programs REALLY hard to debug later. If it's not supposed to ever happen, and it can't be propagated to the caller because it's a checked exception, then please catch it and throw a RuntimeException, AssertionError, UnsupportedOperationException, IllegalStateException, IllegalArgumentException, or whatever (all of which are unchecked) rather than silently hiding the error and pretending that nothing bad happened.
And that word is "DataGrid".
For web applications, it's a godsend. I know it's a horrible mung (look at the source it creates on a web page), but for ease of use and speed of development, it knocks JSP into a cocked hat.
They will never know the simple pleasure of a monkey knife fight
Crap.
C is the most successful language in history, and vendor support for it was fragmented at best. If you've got a good compiler, you understand the language and you have all the tools you need, who cares if the vendor goes under? Your assertion that the "longevity" of the vendor counts in the slightest has no substantive argument or evidence backing it up. Defend your position! Just because the store that sold me my deluxe high-powered all-in-one combo jigsaw/drill/planing tool has gone out of business doesn't mean that the tool is worthless, and that I should therefore use a hammer.
My position is this: when you're starting a project, you have several goals, with different relative importances. Often the primary goal is to get the job done quickly, in which case a so-called "scripting" [emotive and inaccurate term] language is your best choice. At other times interoperability with certain other products is more important, and that drives the choice of language. Sometimes speed counts. Choose your tools to fit the job!
Most of the time what I see in reality is programmers choosing languages not because of their technical merits, nor even necessarily because they're popular, but because they've had a lot of press. What kind of a criterion is that? How many of you (programmers) can honestly say you've mastered more than three languages? Speak up now. No? Then wouldn't it be fair to say that your toolbox is a little empty? And if that's the case, isn't it just maybe possible that you don't always use the best tool for the job?
In a word - no.
XMLEncoder will never be useful for example for taking an existing XML schema and writing code to read/write to it. C#'s XML serialization/deserialization on the other hand is.
I'm also not referring to XPath - also nice but very limited as soon as you want to handle heirarchical data.
Wow. Either you're a MS zealot, or greatly misinformed. Or both.
At my former company, we switched to JDK 1.4 and tried to run with the 64 bit JVM. Not one line of code (out of millions) had to change for the entire application to run as smooth as ever on the 64 bit JVM (Sun's one at least).
This is true because Java doesn't provide a way to mess with pointers. Pointers are an abstract concept and they don't convert to numbers as in C/C++. Hence the total transparency of switching to 64 bits.
The code you provided doesn't compile because arrays do define their length in integers, not in long. Hence, Java arrays are 32 bits.
Not a very big limitation, by any means, except of course for some very specific niche purposes. But most of them can be worked around trivially anyways.
And I am not even mentionning the fact that C# has yet to see its first 64 bits implementation.
Write boring code, not shiny code!
This is best refactoring IDE out there. Nuf said.
And I must concure, VS is about as functional as textpad, dono what the fuss is about, no clue for the clueless.
Ohh yeah, try IDEA!
http://www.jetbrains.com/idea/
Still not convinced?
http://home.iprimus.com.au/trinexus/idea.html
GPLv2: I want my rights, I want my phone call! DRM: What use is a phone call, if you are unable to speak?
This is why marketing and eng's shouldn't mix :)
GPLv2: I want my rights, I want my phone call! DRM: What use is a phone call, if you are unable to speak?
It's too easy to give C# an advantage about what it adds to Java and forgetting it's a 95% Java clone.
Don't forget It took 7 years of Java and a Borland expert to produce C# !
During this time, Java did conquer most of the enterprise application development market and defined a technology model based on application servers handling component lifecycles.
C# as a language,has taken most of java state of the art paradigms and added some new features which are neat but, despite its huge base library is far from Java versatility and degree of maturity.
Java 1.5 advantages
Java 1.5 Drawbacks
- Client Side:
- Swing (but SWT / Eclipse rocks)
C# advantages- Management aspects
- Still time to have plenty of Microsoft support if you have a interesting project.
C# drawbacksSo, my conclusion is that by now, both technologies are interesting but Java is the most versatile.
I would prefer C# for:Windows Programming ,Attractive Web based interfaces (if an acceptable target platform is Mono or Windows),
Porting existing windows applications to Web,
Simple Self-Contained Web Services
I Would prefer Java for developing:Enterprise Applications,Complex Web Services,Highly interactive web interfaces (through applets),Multi OS client application.
For me, both languages are relevant, it's only a matter of what work has to be done and what resources are available to make it.Most of the time, technology is chosen based on a company resources capabilities!
What has providing runtimes to do with being open? Quite a few commercial, closed applications are available for linux (Oracle anyone?), does that make them open?
> Java might have a very hard time keeping up with C#
C# is an ECMA standard whereas Java is a Sun product. Wont't this make it harder for C# to keep up with Java in the future?
Get real. Sun has donated more to open source projects than almost anyone else (except maybe IBM).
Sun may not want their products destroyed by giving their enemies in the open source movement (the religious zealots who want to destroy all "evil companies" or maybe just destroy Java in favour of Perl or C) but I can hardly blame them for that.
Most people here are obviously not professionals. They don't realise the truth and wisdom of your last paragraph because they never have to deal with different environments in different companies (or projects within one company), being safely hidden from reality in the ivory towers of their temples to Linus and ESR.
I am not able to rightly apprehend the kind of confusion of ideas that could provoke such an article!
Ceterum censeo subscriptionem esse delendam.
I just had a Post Grad Flash Back 20 years ago of a class in the Tuple Calculas. At the time, for me, it would have been better named, "Set Theroy, Gone Bad".
I'm thinking there are several languages that can return a Tuple. "C" programmmers call it a "Structure". Object Oriented programmers refer to the rules of a "Object Returned", or "Get, and Set". My personal favorite is PERL's "my ( x, y, z ) = someFunctionResult;"
I see a time when there will only be one language that will be used. This new language will not come from the ones who give tribute to Redmond; Because it is not the way of the dwellers of Redmond. But from the morphing of our existing languages to a syntax that will be more easily understandable by both man, and machine.
Who the hell went around marking everything under this topic as "troll"? Moderators should be required to justify such with a detailed message. I have no fucking hint why they are complaining. Wanting functions is not a "troll" for fucksakes! GOTO HELL MODERATORS! Fry fry fry!!!!
Your original post proclaimed Java must declare exceptions, which is false.
No, it didn't even proclaim that. But, just for the sake of argument, let's say it did: if you tell me that you eat cookies, does that mean that you eat every cookie in existence?
Sorry, you implied it with the line:
C# does not force you to declare exceptions
What am I supposed to think you are saying?
If I am talking about Jim and Mary, and state "I like Jim and Mary, but Jim hates cookies" would you not at least assume that Mary has tolerance for them?
The problem with Java's declared exceptions is that libraries are full of exceptions you do have to declare, and those cause problems. That is, the existence of an exception declaration mechanism in the language is the problem.
An additional problem is that Java doesn't even type-check the declared exceptions it has correctly: something can throw java.io.IOException even though it doesn't declare it.
Let me correct you once more:
* Libraries full of exceptions you have to declare - false. Some libraries have exceptions (though not all) and they do not FORCE you to declare them. they force you to DEAL with them, which usually means catching and re-throwing, or catching and ignoring. In my case library exceptions are converted to runtime exceptions so I don't have to declare them at all. And that's what you should be doing anyway, as the points that are dealing with things like files are also the points where it's best to handle error conditions and convert the IO errors into some more semantically meaningful exception - which can be unchecked.
Note that some libraries do take an elightened approach to exceptions and use unchecked exceptions instead of checked (the Collections API, which C# has a weak copy of). As Collections are some of the most used classes, this reduces the burden for the common case.
* Something can throw java.io.IOException even though it doesn't declare it.
How would that happen? Give me some Java code that will compile and do exactly that.
If you say "throws" then you have to declare it throws that exception, unless of course its a runtime exception. So you get the best of both worlds in that you can use hard exceptions if you like, or use soft ones for larger systems where it makes sense (though I do think there is a place for checked exceptions at some API boundaries).
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Well, I was being a little pedantic but you're right we were generally in the same area.
.Net has it's own form of that in operator overloading support, from experience of what people do when they discover overloading I would say that prefer a little abuse of checked exceptions, which I can at least wrap and toss.
.Net has the luxury of ditching when moving forward. Myself I think it's quite handy that I cen develop code using generics and send the bytecode off to a device that has never even seen generics. I would like the reflective capabilities .Net offers, but I can see a pretty sound reason for choosing the path they have and the benefits are still pretty good.
I will say that the compiling against a class that does not throw an exception and linking against a version that does strikes me as unlikley!
You're right that checked exceptions are a tool that can be easily misused, especially since for a while so many people seemed fond of them. But I feat that
Java does have a few technical quirks but that's what comes of being a widley used platform! At some point you have to consider the benefit of helping support older platforms, which
"There is more worth loving than we have strength to love." - Brian Jay Stanley
.Net == VB just slicker. COM still under the hood ...buggy and security nigthmare
There is great coverage of that here:
http://www.gotw.ca/publications/mill19.htm
I read all the threads,
I'm not sure why I did that.
My mind is mushy goo.
Comparing Java to C# as the only available options is like comparing republicans to democrats. The correct answer is "none of the above". Real Programmers write in Perl.
The API designers have special obligations that other programmers don't. The program exiting may be something that developers would consider "predictable", but the end users would NOT.
Irritable, left-wing and possibly humorous bumper stickers and t-shirts
Or, you could populate it using models.
Most have abstract implementations that only require that you specify the data; providing event support for you.