Archive

Posts Tagged ‘C#’

IBM to buyout Sun Microsystems?

March 19, 2009 5 comments

This story paints a gloomy outlook for Sun Microsystems. This purchase would certainly end the “wars” between IBM and Sun over Java… One has to wonder what it would mean for the future of Java (the language, the platform, everything). At least HotSpot and the class library are open source now.

My understanding is that Microsoft are cashed up in this economic crisis. Plus they’ve even hired Neal Gafter. Microsoft hire a lot of very good guys. With Gafter over at Microsoft, I wonder if that influenced the decision to squash closures for Java… That was the dumbest move for Java. I suppose it doesn’t really matter: for me, Scala is the next Java.

I wonder if businesses will be more likely to adopt .NET rather than Java now though and really turn the tide. This global recession is turning out to be what I call The Greater Depression, some The Second Great Depression and still some other young ‘uns The Great Depression 2.0. I wonder who will come out on top? With ReSharper, Visual Studio is actually pretty good! So, no excuses – go brush up those C# skills! ūüėČ

Advertisements

Exceptions ‚Äď checked or not?

The Java Posse #127 podcast talks about the possibility of removing checked exceptions from the Java language. The JavaPosse folks seem to universally like them. No one knew what Scala did with respect to checked exceptions. Turns out that it does not have them!

3.3. Why are there no throws annotations on methods, unlike in Java?

Compile-time checking of exceptions sounds good in theory, but in practice has not worked well. Programmers tend to write catch clauses that catch too many exceptions, thus swallowing exceptions and decreasing reliability.

If you haven’t seen the Scala language yet, check Martin Odersky’s Google Techtalk.

I tend to avoid checked exceptions. This is the way that the Spring folks have gone and – of course – Anders Hejlsberg. Anders did a great job designing the C# language.

I’m still digging into an article on dev2dev which promotes checked exceptions and points out that that the times they get annoying is where the Java API was poorly designed. For me this still points that checked exceptions are a experimental language feature perhaps best left out of industry programming languages for now.

When can I get a fix of language goodness?

February 1, 2006 Leave a comment

After reading a recent paper by Erik Meijer and Peter Drayton I am convinced that I’ll be programming in C# or one of it’s descendents sooner rather than later in order to get my fix of language goodness.

The paper is “Static Typing Where Possible, Dynamic Typing When Needed: The End of the Cold War Between Programming Languages“. I think of this as “How to have your cake and eat it too” for the programming language community :). I really loved the paper. My eyes glazed over at one or two type equations but perhaps I’ll get back to those :). It’s a laundry list of cool language features most of which I would want in my favorite language and others that I’d like to tweak a little bit probably.

I loved the rant on XML: “XML is a prime example of retarded innovation”. I really hate how people love XML. NoXML. Ok? They even mention that it’d be better to use something akin to CORBA style IDL for interplanguage communication between the CLR and JVM worlds using a binary wire format. But let’s not leave out scripting languages like Perl, Python and Ruby. Perhaps something like Joe Armstrong’s Universal Binary Format – UDF – is worth considering in this space. Hessian is another reasonable looking solution to this (even if it does seem to fall on the “Java rulez” side of things).

… more to come on this post

Misunderstandings about closures

September 15, 2004 Leave a comment

Even the “big names you know” in the Java software development community can make mistakes when it comes to closures.

Gavin King thinks that closures wouldn’t work in Java because of checked exceptions. However, since the use of checked exception is optional you can use “closures” (annonmous inner classes) pretty well if you either don’t use checked exception or alternatively wrap checked exceptions with unchecked exception (like the JDBC template in Spring). I was wondering if it would be possible to have you cake and eat it too on this point with Java 1.5 generics – another poster says it is possible to parameterise on the checked exceptions. I hope that’s true because that’s the best of both worlds – “closures” and checked exceptions – or at least living life without wrapping every last damn checked exception in an unchecked one ;-).

James Strachan commented that closures have made it into C# 2.0. Another poster correctly pointed out that this is just *not* the case. I can understand why you’d thnk that – you really have to read between the lines in those Microsoft articles ;-). With all the good .NET stuff coming out of Microsoft lately I’m surprised they didn’t correct this properly in C# 2.0. I much prefer their implementation of generics – it’s not based on type erasure like in the Java.

Martin Fowler (if you follow the link through to his article) is right on the money. Closures are good. Lisp is good. Ruby is good. Smalltalk is good. You gotta love Martin.