Saturday, August 19, 2006

FP on the brain

I did a presentation for our internal user group about languages other than C# including SML, Scheme, and Ruby. I was attemping to illustrate functional programming, code as data, lazy evaluation, and dynamic typing to a group who had mostly only dealt with C#, partly to talk about elements from those sources that LINQ will incorporate and partly just to share my enthusiasm.

I hadn't touched SML in quite awhile, but it was really easy to pick back up and still was just as much fun to write. It's powerful, expressive, and has a nice, clean syntax. It might fit really well in a middle-tier type setting, since that would side step the need for strongly typed database access or a web service toolkit. I need to investigate SML.NET and F# some more as potential avenues to make this happen. The OCAML syntax of F# bugs me, but I read a cool paper linked off of LtU about its template/meta-programming capabilities which seemed really promising.

The more I learn about Ruby, the more I like it as a language, too. The dynamic typing bit still scares me some (especially after SML), but metaprogramming as a means to eliminate boilerplate junk and also to build internal DSLs is just cool. The interop with .net story isn't quite there yet, but I bet it will be soon. For the time being, I'm going to play around with using Ruby to generate C#/XML/WSDL/etc.

No comments: