Popular links

Topic maps


Claudio Monteverdi

Alexander Johannesen

Technologies used
topic map logo
xSiteable logo
Tue, 13 July 2004 13:00:00 GMT

Notice! This blog is no longer updated as such, and the new spot to point your feedreaders and blurry eyes are https://shelter.nu/blog/

This also means no more comments here, and especially not you spammers, you filthy floatsam of the internet!

Back in the Java sadlle again

There are of course many different views on what the best programming language might be, or even might be like. There is the battle of the two major - Java vs. C# - and then the bickering of all the rest of them; strongly typed, loosly typed, OOP, functional, pragmatically structured, strict type, low syntax impact, semantic syntax, lingustic semantics, virtual engine, compiled to binary, interpreted, half-baked, and on and on.

Java is in the OOP camp, compiling to bytecode which is run in a virtual machine. And I'm back in the saddle after doing mostly XSLT, PHP, Python, JavaScript and HTML for the last year or so. Funny, but getting back to Java feels a bit limiting to me, but I'm sure that's only due to the strongly typedness of it all; I'm sure that will squash a few could-have-been bugs.

The funny thing about Java is how complicated it feels. Sure, I can work out exactly what is going on, where, why and how, but it just feel ... complex, and I mean in all the wrong places. Why should it be so hard to do string manipulation, anyways? Or even testing on types? Or converting between types? The strongly typedness of it all is my biggest ... uh, mumble about it right now. Don't worry; it'll pass in a day or so.

Oh, and this is also my posting number 100 to this blog, so happy anniversary to me.

Permalink (Tue, 13 July 2004 13:00:00 GMT)| Comments (4) | Programming
Lars Marius Garshol ( Tue, Jul 13 2004 )
Why should it pass? I've been doing Java almost every day for six years now, and I *still* feel that way...
( Tue, Jul 13 2004 )
C#, like Java, is strongly typed and have almost the same restrictions. Although, I can't say I find it either hard to manipulate strings, type-testing (typeof) or doing type conversion (casting). It's all a part of the language, and I think it feels «right» how it is.
I've programmed VBScript, JScript, JavaScript, Python, PHP and other loosely typed scriping languages for many years, and although I admire JavaScript's adaptiveness and how much you catually can have done with it, I think script languages finally is best suited to prototype, while compiled and strongly typed languages is better for writing production code.
Maybe this is because C# is simpler than Java, or because I've written too many buggy script-based applications in my life; who knows. I do enjoy the extreme usefullness of compile time error messages, though, and feel a lot «safer» in a compiled and strongly typed environment. It's not that efficient, of course, but overall, I think it's better.
Congratulations with posting number 100, btw. Hooh-ray!
Alex ( Wed, Jul 14 2004 )
Well, I agree that compile-time errors are nice, but in their absence I've been getting along quite nicely through the methods I've been using. Yes, I had a PHP for prototyping essay a couple of months ago that talked a bit about this; if you keep to certain rules, I'm much more productive in PHP than in Java. Java is just ... to litteral, to verbose, to uncompromising. Maybe not always the Java language itself, but at least all those utils and libraries people have created which we use.
Anyways, Java's still the better option for a lot of things, don't get me wrong, its just ... hmmm, slow for me after a lot of fast-paced hacking and slashing.
( Mon, Jul 19 2004 )
I've just climbed back in the Java saddle again too. I'd basically taken 1 year and a half off (due to a 700 location move) to do PHP (version 4).
My original OO language was Smalltalk, which I did for 3 years as an IBM consultant. Smalltalk, like PHP OO, is very loosely typed. This is incredibly liberating for elegant designs, especially when you want to leverage polymorphism. Polymorphism is possible, but cumbersome to achieve in Java. Those loosely typed languages are helpful that way.
However, don't get me wrong. Java is my first love. Despite the teeth-gritting I have to do with the strong typing, I was very relieved to be back to Java. It was like rediscovering and old friend.
I think PHP can eventually overcome the reasons why I think Java is soooo much nicer. First and foremost would be to get a decent debugger out there (I used to write code in the debugger back in my Smalltalk and early Java days!). They have made some significant progress in the object arena (at the expense of being more strongly typed) with PHP 5.
Anyway, check this link out if you want what I think is a good take on the complicated-ness of Java....