Monday, May 04, 2009

The F progamming Language

My suggestion that C++ should split in two prompted an e-mail from Robin Williams. It seems there have been similar thoughts in the Fortran community about extensions to that language. The result is the F programming language.

Its not clear whether F is an active language or whether it is a moribund experiment. As Robin pointed out, one could consider Fortran 77 as the simpler version of Fortran.

I suppose a similar thing could happen with C++, people don’t have to use the new standard, they could just stick with C++ 1998. Hopefully some compiler vendors will offer a switch to switch off the C++ 200x features.

Or of course, we could just stick with C.

I was contact by a company a few weeks ago looking for some Agile and Test Driven Development training. At first my heart sank when they said they still had a lot of code in Pascal, or rather Object Pascal (Borland 7). But in the last couple of weeks I’ve been wondering if that’s a good thing.

I used to program in Borland (Object) Pascal 7 and it was a nice language. Sure we didn’t have meta-templates or reflection but it could do most of what I wanted without half the complications of modern C++, Java or C#.


  1. Allan, I think you're missing the point. The problem with C++ isn't that it's getting new features or is too complex.

    Just like with C99, if the new features aren't useful to people or make it harder to learn or teach, they won't be used: when you mentioned 'sticking with C', I bet you weren't referring to variable length arrays, designated initialisers, compound literals, variadic macros or the type generic maths functions. Market forces will determine whether compilers support different features, just as they always have in C++: export is still unimplemented in all but one front end, and most programmers are mediocre and use barely half the language and a fraction of the standard library.

    The problem with C++ is that it's in the wrong decade and doesn't solve the problems that we face today. In the hands of an expert it's still a great language for situations that haven't changed much in twenty years, and a passable language otherwise, but if I want a language that inter-operates with dynamic languages, runs seamlessly on a variety of platforms in a concurrent, scalable, fault-tolerant network-distributed environment, is easy to connect to everything from databases to web services and is toolable to support the kind of rapid prototyping and refactoring we see these days, we need to look elsewhere.

    C++ won out because it played well with legacy code written in C (operating systems); it will lose out because it doesn't play well with modern systems.

    If you want to look for progress in C++, don't look to the standards committee or C++0x. They're language experts worrying about intricacies that just don't concern other languages, based on principles set down in the eighties ("don't pay for what you don't use", etc). Instead, look to Boost: for a long time it has had threads, network IO, python bindings, support for domain specific languages and more. Look to Microsoft: hate them if you want, but with C++/CLI they brought type-safe accurate garbage collection on a modern platform. Ok, they tried to subvert the standards process to do it, and that's a shame.

    In summary, I agree with you that C++ is a declining language, but talking about complexity is really missing the point. Forking it won't help. C++ serves ideals we no longer share, and that's why we need to be working in F# and IronPython, or Scala and Clojure, or Ruby and Javascript.

    By the way, this is also the reason why I haven't written anything serious in D, even if it greatly excites my inner geek. I did spend fifteen minutes chatting with Walter Bright after the dinner though, and hope he'll come back next year.

  2. Hi Allan,

    I agree with James's view that C++ is essentially a dinosaur, but there are still plenty of situations where you can't avoid using it.

    In this connection, it may be useful to know that Programming Research, several years ago, started to define a "safe subset" of C++. These efforts have culminated in an international standard defined by the Motor Industry Software Reliability Association (MISRA - ). There's MISRA-C and MISRA-C++, and a number of conformance checking tools exist including PR/QA ( and PC-Lint 9 (

    Best regards,


Note: only a member of this blog may post a comment.