Another week and another language. I had hoped Argot wouldn't take too long to port to C#. Well, with a little help from the Microsoft's Java to C# conversion utility it's all done in three working days. Actually it took three days of massaging the code from the output of the conversion utility. It didn't do a bad job, however, I wouldn't want to use it for any larger project.
I was expecting it would take a little longer to fix the code. Thankfully C# is close enough to Java that it didn't take long to fix up the changes. A few things surprised me about C#. The biggest one was the lack of a byte[] compare method. It's always the small things that bite when changinge languages. Searches on google showed it was a rather common query. It didn't take long to handle that one. Most of my time was spent either changing signed to unsigned data types. I never did like Java's ban on unsigned types. The other painful task was capitalising all the first letters of method names. It's something the Java conversion assistant probably should do! I was also a bit disapointed by the result of GetHashCode() on basic integer types. The result is the same as the value. It isn't hashed at all. This didn't take long to work around either. Overall I think the C# version will not look too much like converted java to the C# officianados.
I now have Argot in Java, C and C#! The only bit missing is documentation. This next task won't be my favourite, but documentation can make or break a project. So time to document!