Sunday, March 04, 2007

Taking a leaf out of Gary Short’s (cook)book and blatantly stealing his idea, I’m going to follow his example and start some programming cookbooks of my own. Like Gary, my cookbooks will be based upon the items featured in the Python Cookbook. Gary is currently doing a cookbook for Smalltalk, one of my favourite programming languages, so I’ll do cookbooks for D, Chrome and possibly F# and OCaml. I’m interested in learning all of these languages so undertaking these cookbooks should help me to gain a wider understanding of them and also enable me to share my experiences with a wider audience.

The Languages

D is the creation of Walter Bright, the man that developed the worlds first C++ compiler (before Walter, all C++ “compilers” were C preprocessors). D’s aim is to overcome some of the short-coming of C++. D offers virtually all the features you’d expect from a modern language, including: Templates (generics), Delegates, Interfaces, Mixins, (optional) Garbage Collection, Type Inference, Design by Contract, Tail Recursion and much, much more. The D compiler is free to down load and use and is available for Win32 and Linux.

Chrome is an Object Pascal implementation targeted at the .NET and Mono platforms. It’s being developed by RemObjects. Chrome offers all the features of C# 2.0 as well as Design by Contract, Type Inference and Virtual Constructors. It also improves on “classic” Object Pascal implementations by improving the with statement and by adding the ability to declare variables in-line, like the C family of languages. Chrome is a commercial product but RemObjects do provide a free, command line compiler.

OCaml is an Object-oriented functional/imperative language hybrid developed and maintained by INRIA, France's national research institute for computer science. OCaml can be interpreted or compiled very efficiently into native code. Like all the languages mentioned so far, OCaml supports Type Inference, Garbage Collection and Generics. Also, as you would expect from a functional language, OCaml supports: Tail Recursion, Pattern-matching and Currying.

F# is an experimental functional language developed by Microsoft and, as you’d expect, F# is targeted at the .NET platform. F# is based on OCaml.

Tags: , , ,
posted on Sunday, March 04, 2007 8:06:44 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback