-
Website
http://brizzled.clapper.org/ -
Original page
http://brizzled.clapper.org/id/93 -
Subscribe
All Comments -
Community
-
Top Commenters
-
mattbriggs
4 comments · 1 points
-
Ray3
1 comment · 1 points
-
Brian Clapper
55 comments · 1 points
-
breton
2 comments · 1 points
-
andrewziem
1 comment · 2 points
-
-
Popular Threads
-
Brizzled: Scala and Python: An informal TCP performance benchmark
6 days ago · 1 comment
-
Brizzled: Scala and Python: An informal TCP performance benchmark
This article is more about how Java has languished than anything else. I'm pleasantly surprised at how good C# is, as a language. I'd still rather not be tied to Windows and .NET, though.
There are only two things speaking for java (other than that it may be used in the "business world" for being paid money):
- The Java VM
- Scala
And personally I dont really think Scala is a huge winner here. But it may be interesting how C# counters the Scala "threat".
For my client, C# is the better choice, because they are a Windows shop; pushing them toward the JVM (even assuming I could manage that) would not be appropriate. But that doesn't make C# the best choice in all cases, and it's certainly not the best choice for the work I'm doing on my own.
"(C# has anonymous inner classes, too.)"
you probably mean that C# has anonymous types? This is far less capable that Java's anonymous inner classes.
What is it with consultants and academics always bemoaning the lack of some "cool" feature of the day a language should have. Working programmers find it a lot more painful having to maintain and fix bugs, and add features to terse, poorly written code that abuses all the cool features someone used to show off how smart they are and because they could.
This is why Java is still a better language for extremely large enterprise software development and I hope it stays as simple as it is.
I used Java for nearly a decade, as a "working programmer". I am still a working programmer. Java has not kept up with trends in language development, and that's a bad thing. Languages evolve. Programming techniques evolve. If they didn't, you'd be doing your work in Fortran 66, which is much, much simpler than Java.
The fact is, there are newer languages features that make life, for programmers, better. Those features simplify tasks, make reuse of code easier, make it less difficult to write robust code. Those features are not making it into Java, and that will end up making Java less attractive to skilled programmers. In fact, that's already happening. Spend some time in the Scala community, as I've been doing, and you'll see some examples of that. It's not just academics. Experienced working programmers recognize when a tool needs improving, or when a new tool simply does the job better than an old one.
See at one time PHP lacked all of the cool features, and this was the selling point of the language. A great marketing triumph MySQL and PHP was to turn their faults into their sole market push -- obviously these features it lacked you "couldn't" use, and "couldn't" had to be better than "optionally" which introduced discretion. Now, given the time to develop those features both of these products have exploded with the same functionality their roots shunned. MySQL has views, triggers, column and date constraints and all sane MySQL users prefer the Inno database, while PHP rushes towards badly-implemented interfaces, abstract classes, namespaces, unicode, eval, and lamdas.
My purpose is not to lambast a language, but simply to reiterate the fan-base will always be dependent on the *direction* of their language, and the *status* of all others. With Java lacking and C# filling its void it only stands to reason that the Java user base will either migrate to C#, or Scala, or become extremely defensive with inane points.
In my eyes technology that is sold or marketed on simplicity at the expense of optional features is almost universally crappy. I don't use Java much. I never really got into it. I also don't own a single copy MS Windows, nor do I have a pirated copy... And, here I am learning C# and dieing for Perl 6 and Parrot. I enjoyed your post and identified with your position -- thanks.
button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.out.println("The button was pressed!"); } });
and
button.Action += ((e) = > Console.WriteLine("The button was pressed!"));
They both accomplish the exact same thing. I would call the C# example terse, but it isn't exactly bad or unreadable. The java example on the other hand is absolute insanity, and as a working programmer I find it hard to believe that other working programmers would consider that easier to learn , maintain, or bug fix.
I contend that this, too, is far more readable than its Java counterpart.
It would look even more readable if Disqus supported the <pre> tag...
One of the posts here says " then the trillions of java libraries was a nightmare " dont learn them ! learn them when you need them. THey are many because Java can be used for everything and because java is here from 10 years maybe after 10 years in C# you will have so many libraries ... no C# will not be alive in 10 years never mind.
-Java is good because the language is easy readable
-The time for learning the language is small
-Difference between versions doesn't require to buy a new book and learn new language.
-there are tons of frameworks and libraries and THIS is good.
For example you have to create OpenGL ES game for Google Android in java - no problem if you know C# ... than oo yes than I will make the project in java :) thanks for the money
Seriously, programmers who are willing to dive into new languages and learn new things are programmers I want to work with.
To each his own. That's like telling someone who lists luxuries in a car as a selling point that for them the features and addons inside the car doesnt make it good. It does IF that's what is important to the customer.
"-The time for learning the language is small"
If you came from a STONG programming background I agree. I have spoken to many close friends who said the transition from say C or C++ to Java was cake. BUT speaking from my own experience, where I had absolutely no programming background whatsoever, Java was a pain in the ass to learn. It was like having to, personally code, built, install and learn to use Sun Solaris compare to just installing and using Mac OS X off the bat. To the point, the learning curve was mount Everest. Again, this is just my own unique opinion/experience.
"10 years maybe after 10 years in C# you will have so many libraries ... no C# will not be alive in 10 years never mind"
Only if Microsoft no longer exist in 10 years. The argument for that is a whole different story on its own.
Java has gained rather few language features and as a language doesn't offer many exciting features. That is however the reason why we develop for it. I believe that fewer features and aiming towards correct usage of those features will yield better maintainability in the long run.
And of course with .NET you get zero portability and zero good IDE's (for Java you get two do-it-all solutions for *free*). Visual Studio 2005 is no match for either of Netbeans or Eclipse, and what I've read about VS2008 and the upcoming one those are even more slow than the previous ones, with still little functionality for that cost.
This is without even mentioning Windows, MSDN licensing costs... (We develop and deploy on Linux most of the time, test also on Windows).
I'd like to keep Java simple with limited feature set and use Scala or Groovy for the areas they excel.
Not adding useful new features out of a misguided desire to keep a language simple is a good way to push the language down the path to irrelevancy. There's a reason functional languages are becoming more popular, and not just among academics. (Two recent talks at the Philadelphia Area Java Users' Group were on Scala and Clojure; both talks were extremely well-attended. The bulk of the audience consisted of practitioners, not academics.) Practicing programmers *want* these new features, and Java isn't keeping up.
How long have closure proposals been floated for Java now? Four years? Yet, the language still doesn't have them. C#, Ruby, Python, Scala, Clojure--these languages all have that simple, elegant feature (and many other useful features). But not Java.
I spent a lot of time programming Java, and I still have couple small open source projects on my web site that are written in Java. I have a fondness for the language. But, these days, I choose something else when I reach for a programming tool. For my own work, at home, that something else is Scala.
BTW, it's sad that so many people on here don't get the point of this blog post. Bet all of those folks insulting you haven't used any language but Java. Good developers, consultants or not, learn multiple languages and understand the strengths and weaknesses, and choose the language for a given task based on that information, and not some blind fanaticism. You're also right on the money when you say that language design evolves, and though we don't want bloated "kitchen sink" designs, a language the fails to evolve is destined to become marginalized.
I'm willing to be proven wrong, though.
In any case, thanks for the thoughtful comments.
I'm not here to prove you wrong, really, especially when it's uncertain what your actually asserting. However, you can easily search the web for .NET code that runs on both the Windows CLR and Mono, and the Mono website clearly indicates what platforms it runs on. So strictly speaking portability using the broad definition most people would use, .NET is portable.
In the java world, it is not like that. You will end up with platform specific quirks on any non trivial project, but the typical java codebase is pretty much binary compatible for all platforms.
This has been my experience, as well, over my decade of Java programming.
http://www.mono-project.com/Moonlight
:)
cheers,
Brian
The bloated bit about mono really puzzles me. It's much more lightweight that Sun's JVM in respect to startup and memory consumption.
It's hard to argue that mono is as mature as Sun's JVM, but for a lot of workloads it's as good as one needs it to be. The same can be said for performance. But if the issue is that you have hit a bug, don't be selfish and share it with the mono community, we are a very welcoming one.
There are a few things missing (DirectX, and WWF), but seriously, I've found it to be a lot more cross-platform compatible than java (just my personal experience).
I have to admit there are a couple of things in C# that I would like to see move to java (like implicit typing) - however operator overloading is unnecessary (IMHO) - and I could take or leave lambdas and delegates...
Anyway - again - thanks - this is a good conversation to be having... people should know what tools are available and how they actually compare.
I understand there is JCP process, but it seems a bit stagnant right now. Project Harmony, closures for example. Things that are simple like properties shouldn't take some major effort, even when you take into account the bytecode backward compatibility, but even that is not there yet.
My hope lies on Scala. But it seems for it to gain traction, big corporations would probably like to have a vote in it (JCP again anyone? or SCP for that matter ;-) ). And the fact that it sits on top of JVM (what will happen to Sun after this? are they going to keep maintaining it?), adds some bit of the uncertainty.
Of course, being a VM language, I would suspect it would be possible although not trivial, to actually port it to different VM. Then again, there's the issue of portability. I know about Mono on Linux, but does it run on any other flavor of Unix?
As for Scala, I'm really enjoying programming in it. Its relative lack of traction gives me pause. I would not push it on one of my clients lightly; the likelihood of finding qualified Scala programmers in my area is low, compared to the number of qualified Java programmers. (That same concern applies to Clojure and Groovy, to be fair.) But Scala's momentum appears to be growing. I have been on three Scala mailing lists for a little while now, and the energy (and sheer intelligence) on those lists is compelling and fun. I have hope that Scala will catch on—enough that I gave a presentation on Scala to the Philadelphia Area Java User's Group (my own, small personal contribution to that end). Scala also runs on CLR, though the JVM version is more mature; if the JVM were to die, for some reason, Scala could still theoretically survive.
Java's stagnation *really* bugs me. There are huge numbers of Java programmers, and the amount of quality (and free) software available in the Java community is staggering. Seeing the language fail to keep up, when there's clearly demand for many of the features mentioned in this thread, is sad and troublesome.
Outside the common C# comparision, I have to say that I have been rather disappointed by the recent evolution of Java (actually it does not seem able to evolve anymore). I wish Sun forked a new java and maintain the old one for backward compatibility. But apparently it has never been an option.
IMHO the best would be an open source vm developped by a community in a model closer to linux or whatever successfull open source community project out there. Parrot is a candidate but who know if it will be that successful.
Maybe we just not need a jvm. Maybe we do.
http://channel9.msdn.com/shows/Going+Deep/Exper...
for an example of how you can use expression trees to do some cool stuff. Written by a scala fan, so also a little talk about scala and C#.
Out of the web programming languages you use, you mentioned scala, and from what I read it sounds like a lovely coding environment. I look forward to see more generic libraries spring up in that language/format shortly.
http://www.ikvm.net/
Two points: First of all, Suns clientel is top tier Enterprise folks who are developing top tier Enterprise systems in a top tier Enterprise fashion. These people want API stability over new features, because they want to be able to get better performance/security/stability through updating their JVM, but do not want to have to update their berjillion line codebases every time. The java team wants to do more, but they have to think very long and hard before adding anything (aparently even generics ended up causing more of a problem then they thought it would)
I think this is why Sun supports (and spearheads in the case of JavaFX) "alternative" JVM languages. They allow for pretty much seamless interop with existing classes, but don't rock the boat too much with the capital-e-enterprise clients.
Second point is that (no offense) but you are pretty new to C#. I have been working in microsoft-land for a few years now, and while the language features in C# are great to have, the language is just chock full of these inconsistencies, and the platform has these oddly gaping holes.
For example, properties are great, but why cant you use ref or out parameters with them? the compiler just turns them into methods anyways, why the additional restriction?
Type inference is great, but why couldnt they have gone the extra mile and added _good_ type inference? (like scala) Like using var in parameters or returns for methods.
Why are methods not virtual by default? It makes things like dynamic proxies far less effective, especially when there is nary a virtual to be seen in the whole base class library.
Generic invariance, with zero options to allow for contravariance (polymorphism in the generic type)
When no enum inheritance?
What is their freakin obsession with the "provider model" (which is a borderline anti-pattern), when there are far better alternatives that have been tried and tested for decades in the field?
Why favor inheritance over composition for polymorphism, and the few times there are actually interfaces in the BCL they violate the Interface Segregation Principal (an example of this is try implementing an asp.net membership provider. There are probably 100 methods in the interface that are around corner case scenarios, but since it is just one uber-interface, they all must be implemented)
Functional style list processing is fantastic, but a) why call everything different names then the rest of the world (Select vs Filter, Aggregate vs Reduce, etc), and why implement some on IEnumerable<T>, but not IList<T>? (ran into this today when I wanted to do a fold on a list, STILL pissed off about it)
Where, where, where, where the hell is BigInteger?? It has been almost a decade....
I could go on. Every language has its warts, but c# has an absolutely shocking amount of them when you start going deep, and seems to accumulate them at a rate that far surpasses other languages. At the end of the day I would rather have an oddly implemented feature then not have it at all, but it is not all peaches and sunshine that it appears to be when you first learn the language (or are surrounded by Microsoft Developers who believe that all good things come from redmond).
Second pont: Java is full of many inconsistencies as well. If you find a perfect language, let me know, but I've yet to use one that doesn't have inconsistencies. My experience is that C# is better thought out than Java.
Out parameters: Why in heavens name are you using them anyway? I'll grant you you have a minor point here, though there's technical reasons for the decision, and this is an "inconsistency" that the vast majority of users will never realize exists. Let's make a mountain out of a mole hill, mmmkay?
Type inference: One of the best points you make, but that level of type inference is non-trivial not only in the implementation but also in the usage when you hit corner cases, so I can understand why they didn't go this far.
Virtual by default: Because the designers thought that's a bad design, and have explained why too many times to repeat now. They have a point, and this one comes down to a religous debate, IMHO. I don't believe either side can claim a real victory here. You prefer virtual by default, so like most religous debates, it's not worth arguing with you.
Generic variance: EXTREMELY non-trivial. However, you'll be excited to know that it's in .NET 4.
Enum inheritance: I'm not sure that would be a good thing, and I've certainly never needed/wanted it.
Provider model: Obsession? Anti-pattern? Both of those are large claims that need backing up. Most devs will code in .NET and never run into the provider model, and Fowler certainly doesn't think it's an anti-pattern. Further, .NET 4 will contain IoC concepts, while today we have about 10 different IoC containers to choose from.
Inheritance over composition: I don't see that at all. There's as little inheritance usage in the BCL as there is interface usage. Oh, and picking one interface out of thousands to make a point is disengenous. There's plenty of examples of good interface design as well.
List processing: All of LINQ is built around IEnumerable<T>, because that's the lowest common denominator. Since an IList<T> is an IEnumerable<T>, you can use LINQ with an IList<T>. You're problem was something other than what you're complaining about.
BigInteger: Funny how most developers and most languages get along fine without this. The more important type that's missing is a fixed point floating type that doesn't suffer from rounding errors. In any event, BigInteger didn't get enough testing the last time around, and was marked internal. Good thing, because it was vastly improved upon and will be released as public in .NET 4.
Now, why are Java's generics so borked? Why must you have the duality of int and Integer? Why are there gaping holes in the threading? What about finalizers that work, and a disposable pattern? What about the atrocious concepts used for invoking native code? What about the GC engine's poor performance? Can we move on from classpath hell, please? I'll admit, it's been about 5 years since I last used Java, so some of this may be finally fixed, but my point is that there's no utopian language. You can nitpick the faults of any language and make it out to sound much worse than it really is. These reasons may be why you prefer one language over another, but they're not likely to mean much to someone else, while different reasons are why they prefer another language. None of that is really what this post was about.
.Net's interop.
It's trivial to load dynamic libraries and invoke functions in them. Or to wrap COM interfaces (god forbid you ever need them, but if you do I'd choose C# any day!)
Compare this with Java's JNI :-(((
P.S.
Even so I'd choose Java any day. Opendjk 1.6 is part of my favorite distribution. If I need to do C# I usually open up a rdesktop session, or fire up a virtual machine.
The lack of reliance on JNI in the Java world is often a good thing, at least as far as portability goes.
Secondly, in general, I'm a speed freak. Stepping into a vm where (for example) samplerate conversion is done inside of the vm really hurts, so the more *well-done* JNI links in java the better, for where it matters... I like the potential of the multi-core future, however. Perhaps well-threaded vm applications will actually outperform native code, someday. I am sore tempted to give scala a shot because of what you've written elsewhere. I also like what I see in haskell and gocaml (pseq etc)
Thirdly, I do a lot of real-time performance programming (stuff with strict, often sub 2ms deadlines). I really, really, really do want to join the garbage collected world for more work and to use a better language or language that works with mini-languages to do so. But I'm STILL waiting for a real time capable garbage collector (haven't checked the literature this year)
Fourthly, I also do a lot of work on architectures other than x86, notably arm and x86_64. I don't think mono is going to scale well there, and given the embedded base of the jvm support in modern day cell phones, perhaps scala would be good on that. One reason I never got into python is that there is no compiler for it on x86_64, similarly, despite your praise of the jvm, I'm still not impressed with it on x86_64 nor on arm....
Fifthly, since mono isn't quite fully baked, I'm really reluctant, no matter how nice C# seems (my brother likes it, too), to even look at it. I like languages to have multiple, competing, implementations from various vendors, with at least one open source one, and at least a decade to bake before I can commit to using it...
Still... it's trendy... you can get paid for using it... just like java was in the 90s...
C# mode in emacs any good? Got semantic support?
Lastly, it amuses me that popular languages are evolving more and more into lisp (lambda's, closures) What heck was so wrong with lisp, anyway?
Regarding the speed issue, I would never argue that VM-based languages are suitable for everything. Certain operations still require the speed of a "regular" language. As it turns out, though, most of the work I do isn't in the realm where absolute speed is absolutely required. When your application's bottlenecks are the network and an RDBMS, whether the language compiles to native code or interpreted byte code tends to be irrelevant.
As for LISP, well, it's never entirely gone way, has it? You might give Clojure a try (though some LISPers deride it as "not real LISP").
I always spend a period of several months where I'm in love with a new toy, language, gf, whatever, and then all the warts start showing up, until that is all I can see. C++ is doing that to me.....
What I think people need to is that some very big project that is quite public(as in Twitter to Ruby) that might open up the issues that might arise on that platform. Even better, some Very Big Vendor comes up to provide good commercial support on it. I know right now Novell is offering support for it, but I suppose people are keeping up their wait and see attitude on whether the support or the platform is stable enough for the industry. One thing for sure, MS is not picking up the buck.
My opinion is, people are waiting for other people to put some serious money on the platform before they finally join the bandwagon.
C# may be better than Java, but the Java ecosystem is vastly superior to .NET. My money is on the platform of the people: the Java platform.
The JVM has no support for methods handle such as CLR delegates, which is paramount for LINQ or any more advanced use of closures. Using type per method is too heavyweight and you know that.
The JVM has no easy collectible methods such as DynamicMethods, which is pretty important for implementing dynamic languages and I bet you know better than me that using one classloader/class pair for each method is a disaster. This is a very important feature to support LINQ space and time efficiency.
The lack of VM support for generics or valuetypes makes a lot of things more complex or suboptimal. This can be verified by how a big disaster is generics on Java and how enabling it was for C#. Both of those make the parallel array work from Doug Lea a lot harder and suboptimal - you won't be able to use it with any kind of array in an efficient fashion for example.
Some of this will be delivered on Java7, when it eventually ships, for stuff the CLR VMs offered since a few years ago.
The JVM might be a more mature platform for the virtue of been out for a longer time but calling it better prepared to support other kind
of languages is a technically unsound argument.
Now if you want to start talking about things at a JVM level, there's obviously a lot that JVM does that the .NET CLR does not. It is a much better dynamic language VM...since it's basically a dynamic language VM underneath its Java exterior already. Because it optimizes all code dynamically as just a graph of methods, it can optimistically inline any piece of code into any other piece of code. .NET CLR can only inline what it's able to optimize at startup, and does no runtime optimization. .NET CLR also cannot inline across assemblies, nor can it inline late-bound code, nor can it inline DynamicMethod or dynamic dispatch into the caller. Because of this libraries like the DLR had to be created to work around the limitations of the VM, constantly regenerating call paths by hand, in order to get at least moderate performance for languages like IronRuby and IronPython.
I could go on, but of course this post was mostly about C# the language, not about the CLR or the .NET implementation of it. What's missing at the VM level is already being added to the JVM. What's missing at the language level...well, the JVM is the platform of the people, and if the people want those things they'll add them or build new languages that support them.
And also like yourself, I recently took on an exciting opportunity with a new organization, but they too use Microsoft and C#. I am more of a 'Mac' guy than a linux guy, and I am proud to say that none of the 5 machines in my house run windows (except for my MacBook Pro that runs Win7 on a parallels virtual machine).
I have not been a 'hater' of Microsoft, but have not been a fan of them for the last 5 years. I think Vista is crap, and didn't like many of their enterprise apps, favoring some of the more open source options out there.
But I have been impressed with what is available with the ASP.NET platform. It is much easier to write apps now than what I have seen on earlier versions of .net. The IDE is really powerful and the language is very mature and sophisticated.
I am not as far as you in learning C#, but with what I have seen, I am impressed, and think I will enjoy.
The only negative I have to say is that I am still not happy with the HTML .net applications render out. The HTML is messy and javascript and HTML is quite messy across the page. This makes it harder to try and decipher what is going on in the client (and I disagree that you shouldn't have to worry about it), and it also makes it heavier load than what can be optimized. But I think you can get around that by using some of the other javascript libraries (jQuery will be embedded natively soon) which should improve that.
All in all - I am becoming a fan!!!
First sentence: I'm currently teaching myself C# with .NET to follow
Corollary: Apples are now better than oranges. I just bought an apple from the grocery store.
Go ahead and read a Ruby tutorial, and I can't wait to see your next blog post: Ruby is now a better language than Java.
How many languages have you actually spent any substantive time programming? I've programmed in a number of them, over the last three decades. I've spent 10 years programming Java; I spent at least that much time, over the years, programming C and C++. I spent 13 months programming nothing but Python. C# is substantially similar, syntactically, to Java; moreover it has clearly drawn from Python, Ruby (yes, in fact, I already know Ruby), and other languages. The point of my article--which, in your haste to deliver a snarky put-down, you somehow managed to miss--is that C# has clearly kept up with language trends, where Java has not. Given the number of programming languages I've used over the years, "teaching myself C#" is little more than an exercise in familiarizing myself with its syntactical quirks and its ways of expressing concepts I've used in other languages. Further, given its historical neck-and-neck race with Java, comparing C# to Java is a valid exercise.
Did you actually have anything useful to add to the discussion?
"For example, properties are great, but why cant you use ref or out parameters with them? the compiler just turns them into methods anyways, why the additional restriction?"
It really doesn't make sense to have out or ref with properties, when you do an assignment to a property, do you really expect the assigment to change the right part of the assignment?
"Type inference is great, but why couldnt they have gone the extra mile and added _good_ type inference? (like scala) Like using var in parameters or returns for methods." They dit this on purpose for code readablility, using var decreases code readability and it only should be used in conjunction with LINQ / Anonymous Types, when you dont know the actual return type.
"Why are methods not virtual by default? It makes things like dynamic proxies far less effective, especially when there is nary a virtual to be seen in the whole base class library." I agree that making methods virtual by default could be handy, but there are two arguments for making them non-virtual. First is, non-virtual methods perform better. Second is, when your class supports inheritance, you should think about it explicitly, the keyword virtual reflects this.
"Generic invariance, with zero options to allow for contravariance (polymorphism in the generic type)" I fully agree with you on this part, it's coming in C# 4.0.
"Functional style list processing is fantastic, but a) why call everything different names then the rest of the world (Select vs Filter, Aggregate vs Reduce, etc), and why implement some on IEnumerable<T>, but not IList<T>? (ran into this today when I wanted to do a fold on a list, STILL pissed off about it)" I don't know what you consider to be the rest of the world, but since LINQ tries to resemble SQL it's consistent with SQL. Words like "Select", "Aggregate" and "Where" are very common in the SQL world.
So a lot of the points you pointed out aren't because the c# team couldn't, but they implemented it that way on purpose.
With kind regards!
A year from now, this article would have been far more useful. I think that's bgsu_drew's point. And in that, he's correct.
With properties, everything looks like a public field access, but is either implicitly backed by getters and setters you don't see (e.g., Scala) or provides the capability to add hidden getters and setters later if you want (e.g., Python's property function). The callers still get the clarity of referencing the values as if they were fields; the API writer gets the flexibility of being able to use and modify the underlying getters and setters.
programming less tedious
2009/8/3 Disqus <>:
Not true. Extension methods are a subset of Scala's implicit. Scala's implicit is more like Haskell's type-classes, which has no C# equivalent.
As you may have noticed, from other things I said in the article and in subsequent comments, I'm far more a fan of Scala than C#.
Also, you can use SCALA on the .NET platform http://www.scala-lang.org/node/168 It's not very well integrated into the IDE, but the extensions are there for enabling this scenario. You just have to get the right people interested. Even better is F#. It's pretty close to Scala in features http://en.wikipedia.org/wiki/F_Sharp_programmin... (ML based functional language with object-oriented features) and ships in the box with VS2010.
With the pending release of Moonlight (the open source port of Silverlight 2), the .NET platform becomes even more attractive because it will have a cross-platform RIA framework to which JavaFX pales in comparison.
Download Mono and MonoDevelop here http://www.mono-project.com/Main_Page and get the best of both worlds. Of course you have to be willing to accept that all the latest and greatest might not be present there.
If you haven't already, suggest checking out C# in Depth. It specifically looks at the C# features in 2.0 & 3.0 (which turns out winds up being a very nice explanation of C# for people used to Java). Just personally speaking, have found it a much better way to learn the unique C# features then C# in a Nutshell. And it's interesting, even features shared by both languages - like generics - sometimes have what seems a very different implementation. http://www.amazon.com/C-Depth-What-need-master/...
In .NET world, there is a lot of focus on going by what MS says, and so the innovation is dependent on what MS can do. However, it has given some advantages in the form of more controlled environment (not a run away story like hundreds of web frameworks in Java), and better evolution with language features.
I like .NET & C# for that, but keeping going back to Java world to learn better solutions. It surprises me sometimes that a lot of folks in .NET world are still learning MVC, I have seen plenty of code where presentation directly talks to database. This is hardly noticeable in Java projects.
"foo".hop().skip().jump(); // woohoo!!!
I am a student of BS Computer Sciences.
I have learnt to program in Structured Programming in 1st semester
and OOP in Second semester both in C++.
Now I am looking to learn a new language.
And I am stuck with Java or C#?
What is your recommendation?
Is there an even better alternative?
You suggestions will be appreciated.
On the other hand I also agree that JVM is much more portable and in use than CLR, and I hope that MSFT realizes the conflicting goals of having the most popular developer platform and tying developers to Windows. After dabbling in both open source tools and MSFT tools, MSFT developer tools are indeed the best (Visual Studio beats out Eclipse by wide margin); it'll be a shame for MSFT to continue to keep those superior tools and languages behind the walls of Windows platform. I totally salute the efforts of the Mono folks and think that MSFT should've been the one pushing for the effort; Visual Studio should've beeen cross-platform like MonoDevelop. It would be interesting if in the future the Mono implementing becomes more popular than MSFT's implementation.
The macro trend is for the technologies to be more open, so that businesses collaborate with a fraction of the effort on the technologies (e.g., Linux kernel) than if they were to implement the whole thing (like what MSFT is doing), and also benefit from having a stake and say in the direction of the technologies rather than being dictated and tied to a specific vendor. That's why Unix/Linux is so popular, from the small device to desktop (like Mac OS and Ubuntu) to server.
I have to check out Scala given your high opinion :). I heard twitter rewrote their Ruby code to Scala for performance. One thing I wonder about these other JVM language is performance, whether the community is able to make it keep up with Java (even though all compile down to Java byte code, I assume the compilation itself could have different efficiencies).
I really wondered for the reason on why Visual Studio beats Eclipse. Being so used to Eclipse with all its refactoring and code browsing goodies and finding out that Visual Studio needs Resharper for that, I'm a bit at loss that most .NET programmer I met actually holds Visual Studio in high regard. There seems to be something that I miss from my observation, being only exposed to mostly just one IDE.
Care to fill us in, anyone?
1. Debug visualizer. When you hover over a variable you can see its value, drill down its members nestedly, and copy and copy the values, rather than going to the local variables window.
2. Debug (i.e., stepping in the code) end-to-end, from javascript on a web page in the front end, to the C# code in the middle tier, all the way to the stored procedure code (in T-SQL) in the backend. This really speeds up development.
3. Better designer. I know Eclipse has plugins from the vendors for the designer, but the ones I've seen haven't matched the built-in designer for VS (for win form desktop GUI apps and windows mobile apps). The designer just makes it super easy to connect up UI elements and their code behind. I've also used Interface Builder for iPhone development and QT Designer for Linux development and they are not as user-friendly as VS either.
4. Just better performance than Eclipse in general. This might be due to the fact that Eclipse is written in Java and VS is native code. In general I just find VS snappier and doesn't freeze as often. I've had to restart Eclipse a couple of times due to freezing from background compile, and after I turn off background compile, there were a few times when I manually compile then it freezes.
Anyways just my opinion.
I have to agree to three of your points, except for the first one. You can hover a variable in Eclipse to see its value and drill down its members.
As for the debugging code from end to end, from Javascript to T-SQL, I have to admit nothing will beat Visual Studio. That is of course, assuming you are using the whole Microsoft stack. Microsoft products are made with that in mind. Java have a lot of vendors for the infra and for them to agree on something, they will have to get their expert group together on a JSR. More options I believe, but less specialized. If they (the Java vendors) needs a new standards, it would take a while whereas in Microsoft world it would be much easier, because there is just one party that makes the call.
As for the GUI designers, I believe that their development products are made with rapid development in mind, whereas in Java, most focus that I see is on having reusability at the code level.
Just my observation.