Are there any good and interesting programming languages for the CLR that you are using and you’d like to talk about? Apart from the obvious ones like C#, VB.NET and F#. It seems that a lot of cool looking languges died out like Cobra, Boo, Nemerle. On the other hand there’s some languages that aren’t that CLR specific like Fantom, Haxe, Clojure and Oxygen. What do you think of alternative languages on the CLR?
While I have Oxygene, I generally tend to use C# for almost everything these days. Oxygene is interesting as I used to program in Borland Delphi. (Occasionally, I still do…)
Problem with alternate languages for CLR is that you need to install one more compiler and learn one more programming language. And the C# language already has a huge amount of features that are very practical so you can wonder what advantages other CLR languages would have. Those other languages will need to provide some functionality that C# doesn’t have. And C# is an extremely rich language already.
I’m all in favor of learning new programming languages and already know several dozens of languages. But languages are just tools that you use to make a product. And in most cases where I need a project that runs on the CLR, the C# language is good enough.
Outside the CLR I would use Delphi or C++ for desktop applications on Windows. Or C++ for other operating systems and for using on Arduino boards. Python and PHP are also occasionally used by me for scripting purposes and for maintaining existing websites. At a previous workplace I also still used VB6 (not the .NET version) as they had some legacy project that still needed to be maintained. I sometimes use XSLT for transforming XML files between formats and SQL for stored procedures within my databases, whenever needed. Rarely, I will use Java and I’ve also used Lua for some project once.
But basically, I pick the right tool for the platform that I’m targeting with my projects. And as .NET and the CLR is my main target, I generally have no use for any other CLR languages as they don’t add much extra functionality.
Well, except for Oxygene as I could use it to convert some of my older Delphi projects…
So, which language would add functionality to the CLR that C# doesn’t have? Maybe a .NET version of the SQL language but we already have that one. It’s called LINQ. Or a .NET version of XSLT? Would be interesting to have some improved handling of XML in the CLR, even though the XDocument and XmlDocument class are both very useful already. Besides, XML seems to stand still at this moment, reminding me of the .INI files from the past…
So, alternative languages are fun, but does any have a real valuable purpose to add to the CLR? Except for Oxygene, none…
True, but most projects can be done by plain-vanilla code. And the tools for C# are getting better and better. But in the past I did make code generators for C#, in C#! You don’t need Python to make code generators.
Evaluating code at runtime is generally unwanted as it could generate a security risk.
As for different compilation targets, there’s always the .NET Core and Xamarin.
It all depends on what your needs are for the projects you work on. When the CLR is your only target, C# tends to be more than enough. I like to use the best tool for every task but C# does the job all by itself in most cases. At least, for me…