Thoughts on Haskell and other Stuff

I just found the time to read Haskell and Scheme. It made me remember the old Gopher days at the university. The moment I finished the Huffman encoding I realized the benefits of being able specify functional shit in a functional style. Quicksort is probably the better example. How cool is that?

But there’s a problem. And it’s a simple problem. The world is not purely functional. And sometimes the world is huge. What I mean is this: Sometimes it is important to have something like the Java API or .NET as your foundation. There just is no way around it. Even in languages like Ruby. You can believe the Ruby and Rails hype. There is some truth to it. But just don’t try to process lots of data with Ruby. Don’t write a multi-player game server. Don’t do this. Don’t do that. Of course other languages can be used. Erlang comes to mind. And some C++ zealots will tell you that C++ is the only choice for game-related stuff. BS, I say. Nevermind.

No, look at JRuby. It is an amazing system. Combining the wonderful world of Ruby syntax and expressivness with the Java API. And yes, Haskell can somehow be extended through C code interfaces. But that’s just not the same. Not by far. JHaskell is what we need.. :) (But then again, with the current limitations of the JVM and the way the Sun guys somehow tend to avoid breaking compatibilty, the JVM will probably evolve too slow and be replaced sooner or later by something else. Maybe the CLR. Maybe something else.)

So – for me at least – it all comes down to making a language available for the Java API (well, the JVM really) or .NET (CLR). Of course this has implications for the target virtual machines. It’s all being discussed already. No need to go into this here any deeper..

In a perfect world I could use IntelliJ to edit my source code. With support for Haskell, Ruby and Java. And all the files use the right compiler to generate classes and/or byte code. And it all would just work together. On an Ant level haskellc and rubyc would be available besides javac. With rubyc being a funny thing.. :) In fact, interpreted scripts are still a bit of a problem if you think about it in a Java project structure context. Don’t you think?

Well, it’s cool enough that you can use JRuby to run a script and it has the full Java API available. That’s a start.

Anyway, I’ll wait for a JHaskell. And while I wait I play some frickin’ BF2142. :)

tfdj

No comments yet. Be the first.

Leave a reply