Quickies of the day

I’ve read lots of interesting things the last week, but haven’t sat down to go through my ”Items for Review” folder until now. By the way, that RSSBandit feature rocks!

  • Gunnar Kudrjavets has an interesting discussion about wheter to have assertions turned on in Release code (Part I and Part II). At first, one would agree with Schneier and Ferguson in that ”That [Release code] is the only place where you really need it!”. The problem is that release code has performance demands. If liberal usage of assertions slow down release code, you’ll be tempted to use them less, ultimately rendering you with a less solid system.
  • Those entries from Gunnar are several weeks old, but I didn’t find out about his blog until today through a post from Cyrus (whose last name I cannot seem to find). Cyrus has plenty of interesting stuff as well, particularly this post about some new stuff coming out of Microsoft Research. AsmL is an interesting system that reminds me of both automata theory and literate programming. Polyphonic C# is a extension of C# for asynchronous concurrent programming, which sound similar to how Erlang works.
  • Another interesting post from Cyrus is where he enters a well-written bug report to the Mono guys (regarding anonymous delegate support). It warms my heart to see Microsoft-Open source cooperation at this level, between the actual developers, and serves as a nice example that we all actually CAN get along.
  • Jimmy Nilsson writes a little about the current state of AOP on the .Net platform. Now, if the AOP fans are correct in that this is the next big thing on the same scale as OOP is the big thing today, you all should expect to deal with it in the real world in about 10 years 🙂

State of alternative languages on the CLR?

A big selling point in the initial marketing of the .Net platform was that it was supposed to enable code written in different language to interoperate smoothly. I always looked at that claim with a fair amount of suspicion, probably since I remember what it was like to develop classic ASP with Perl. If you remember, ASP was supposed to be usable with any language that supported Active Scripting, and ActiveState brought out a Win32 version of Perl that did. However, I never got it to run as smoothly as with VBScript (If I recall correctly, I had the most problems with getting ADO calls to work right), and since it was a ”unsupported” language, I couldn’t find much help on the net. I was hoping that this time around, Microsoft would try harder to make programming in third-party languages a reality.

Now, while the CLR is designed to run IL code which is language-agnostic in theory, it’s seems obvious to me that the CTS was designed for imperative, object oriented language with strong(-ish) typing, and in particular the C# language. It do not lend itself readily to typeless,dynamic, functional and/or logical languages. Articles like Dynamic languages and virtual machines by Jon Udell and ”Ignoring the Scripts” by Larry O’Brien state that noone is using dynamic languages on the .Net platform to any large degree.

However, while I was researching Smalltalk for the IDG.se column, I stumbled across #Smalltalk that seem to be a fairly useful Smalltalk implementation that compiles to IL code. Also of interest is S#.Net, a dialect of Smalltalk-98 that also runs on the CLR.

Some of the other languages that have been made to run on the CLR are:

All these languages are pretty far from being strongly-typed imperative languages, so it seems that it is indeed possible to use more dynamic languages on the .Net platform. Indeed, Jim Hugunin, the author of IronPython (and Jython, the Python-on-JVM implementation) notes that while his initial intention was to write an article titled ”Why .NET is a terrible platform for dynamic languages”, he ended up with the conclusion that the CLR is indeed a good platform for dynamic languages. My question is: Is anyone using these languages on the .Net platform in real projects? I’d be very interested to hear any success stories.

Circles, Triangles and Rectangles

It seems that Microsoft is working with Cambridge university on a extension to C#
called ”Xen”,
aimed at simplifying access to XML and RDBMS data by making advanced data access a
first-class member of the language itself, rather than using libraries, and going
way beyond simple extensions like typed
datasets
and JAXB.

While I do like small, powerful languages like scheme,
I actually think that these ideas have their merits. I remember how differently I
would approach a problem in Perl, due to its first-class
inclusion of associative
arrays
, regexps and
data binding (the tie()
system), and in this
article
from ExtremeTech, I get the feeling that I would be able to tackle more
complex relational data in totally new ways.

I’d recommend reading the article first,
then the actualpapers. So far,
I’ve only skimmed the papers, but I think that if they get this right, it could
be pretty powerful. And innovative.

Also, as pun-inviting as the name Xen may be, I am thankful that they dropped the
original name: X#…