Part II: Choosing a language

4 09 2007

Having chosen a graphics engine I have now decided on what language I wish to use. Part of the many benefits of developing on .NET or Mono is the ability to defer the language choice. Because of the types of games and simulations I wish to make, the language I want has to be flexible, well suited to abstraction and strongly mathematical. This immediately eliminates much of the .NET languages, including C#. Now, C# 3.0 is better than ever with many decades old modern features but still only seems to have done them half-heartedly.

The language I chose was F#. On top of Nemerle. What does this mean? I do not know software engineering nor do I have the time to learn it. So I use something I am more comfortable with, abstract maths as a crutch to help make things go smoothly. Most of the code will be written in F# with Nemerle used to implement the framework or more specifically, the platform. First on F#.

F# is a powerful, succinct, functional, well abstracted language that is very good at large data manipulation and handling complex data-structures. Well suited to doing mathematical heavy lifting. F# is also at least as fast as C# on average (faster on some things, slower at a few). F# is also a well maintained and updated language and remains a priority for the developer(s) who works on it. Next.

Nemerle is also a succinct, functional, powerful hygenic meta-capable language. It is also a language designed with much insight and foresight. However, although it is still being actively updated it is not improving at a very encouraging rate. The language has sort of taken a backseat to other projects for the developers. The core of the language is well founded. However, venturing far outside that core is risky as the edges of the language are still unstable. Nonetheless it remains a powerful well thought out language.

Because of what I plan to do and how I plan to do it, I need as a base a language that is very close to its own specification. As a language which exposes its entire syntax tree, Nemerle fits that bill quite well. I plan to use it to create an environment where I can easily explore and implement my ideas, with natural self documenting code. As stated, most of the programming – data structures and algorithims – shall be done in F#. Nemerle will be used to tie things together since it can be pruned and easily adjusted to be more like one prefers. Including making it operate seamlessly with F#. I think. I plan to leverage and mainly use Nemerle meta-capabilites to help more easily implement my “nonstandard” approach.

Oh yes. the basic structure of the engine is a category.

Advertisements