Showing newest posts with label Languages. Show older posts
Showing newest posts with label Languages. Show older posts

Saturday, February 9, 2008

Your next Language++

Was in a discussion with a couple of technology consultants for the implementation of an upcoming software product, the discussion soon turned into a heated debate over the technology stack to be implemented, the debate soon moved over to choosing a language for implementation (technology consultants can get awfully spirited in these discussions :) ). No prize for guessing - the debate was between choosing .NET+C# vs. Ruby on Rails. I admit I appreciate the Rails framework and often wish we had similar capabilities in C#/VB.NET. Ruby and other dynamic languages like Python can be used to build applications that are incredibly dynamic in terms of runtime polymorphism however it comes at a price – performance.

The real question is if you are already proficient in a software language be it Java/C#/VB.NET etc (and hopefully not extremely religious about it) what would be the other language you need to pick up? Ruby seems to be on every ones radar. Is it the obvious choice for your next language?

Lets take a step back and look at languages in general. Languages can be split into 3 broad categories
- Object Oriented Languages
- Functional Programming Languages
- Procedural Languages

The vast majority of all the software built today are developed using general purpose object oriented languages like Java and C#. Ruby is still a general purpose object oriented language with dynamic/runtime capabilities. Several of these capabilities are now being introduced in the C# language (will reserve that for another post). So that’s the story on the object oriented language side. Nothing significant seems to be happening on the procedural language. But there is some excitement brewing up in the functional programming world.
Why consider a functional programming language? Interestingly some of the new features bleeding into the C# languages such as LINQ, type inferencing (ie using var in C#) etc is heavily influenced by functional programming. OO languages basically focus on state and behavior where as FP minimize or avoids (particularly in case of purely FP languages) state and mutability of data - due to the way FP handle mutability of data via functional operations it FP suitable to execute tasks in parallel thus providing a highly scalable solution to problems that are iterative in nature, Functional programming languages are especially suited for multi-core systems . Companies such as Google have I implemented their search infrastructure on top of FP. A full description of FP is beyond the scope of this blog entry however FPs has its place and in some scenarios may be optimal for use. The question now is which FP language to learn? Microsoft has been working on F# which is a FP language and is also a multi-paradigm language – ie it has implemented several features that are common to both functional languages (largely influenced by ML and OCaml languages) as well as object oriented languages (LISP for instance is also multi paradigm in nature). F# is a good choice since it implemented on the .NET framework. I.e. we can build components that are easily modeled using functional programming style in F# and import those components in C# and vice versa. F#s integration into VS.NET 2005 is a strong indication of Microsofts commitment to the language (unfortunately the addin for VS2008 is still not available).In the future we should can see wide spread adoption of Microsofts TPL and FPX frameworks along with F# libraries.

Will FP finally move from academic circles to commerical application? And how will F# fare ?Only time will tell. Meanwhile I put my bet on F#.

What do you think? What will be your next Language++?

Friday, February 8, 2008

Sun in a language soup

For over a decade Sun has been branding Java as the programming language of choice and building new capabilities around the Java framework, interestingly their approach has been to position the language (Java) along with the framework (Java Enterprise Edition, Java Standard Edition etc). Now Sun is contemplating something the .NET framework had since its inception - support for multiple languages. With languages such as Ruby gaining significant adoption by the developer community neither Microsoft or Sun could back away from adopting Ruby – for Microsoft the implementation of another language like Ruby (IronRuby in this case) would be seamless since they would primarily have to make their implementation of ruby Common Language Infrastructure (CLI) compliant. From a technical perspective Sun would not have a significant challenge implementing Ruby (ie the Da Vinci Machine Project) but what would be the message they are sending to the developer community? Will they reposition the JVM? Will it be rebranded? What will happen to all those acronyms in the Java community (JSP, JSF, JNI, JNDI, EJB etc - and 100s of other popular acronyms prefixed with the 'J' moniker), for that matter you cant call it the Java community can you ? J . Wow think about it a community focusing on a platform unified by a single language – now possibly repositioning the framework in another language(s). Chaos.

Should be interesting to see how Sun and the community pulls it off.