The hunt for the perfect programming language (ppl)

Posted: Saturday, 2010-09-11 16:07 | Tags: PPL, Programming

Basically since I started programming, I'm kinda looking for a programming language that is perfect in a way. First problem with that is that I don't even have a precise definition of what perfect in this context exactly means, but it should go along those lines (in no particular order):

Type system

Take popular object oriented programming languages like Java or C++. Why on earth are "primitive" types treated so way differently than object oriented types? Why would a number not be an object? In most popular programming languages its also clumsy to really abstract types. E.g. in C++ you can use Templates to express things like "This is a list of arbitrary element type" but its lots harder to express things like "If B is a subtype of A than a List<B> is a subtype of a List<A>". (We will come to programming languages which allow such things and much more)

Community support

Not necessarily as huge as that of C++ or alike but productive, helpful and able to fix bugs and port compilers/runtime environments. Naturally this includes the availability of libraries for all kind of stuff. I had this problem with D (a programming language I really like for lots of other aspects) where there was a window when there would be no D-compiler which compiled my (according to the spec correct) code on my 64 bit Linux. Not to mention that compiling under Windows was somewhat inconvenient too when linking to lots of different libraries.


Note that I didn't say "multithreading". Multithreading is fine but I really don't want to worry about complicated locking mechanisms for every damn variably access like a caveman. A lot more scalable idea is to spawn multiple processes (e.g. one per CPU) and have a good way of communicating between them. If this is implemented nicely, you can even spawn the processes on different machines and have communication between them run via network. This is really what you want when you code a scalable app. Again: Not to say that threads would be useless or so in any way, they have their uses and places, but I want a language that can do multiprocessing (or something similar).

Not too verbose

And/or has absurd restrictions. E.g. write a hello world program in Java and compare the result to a minimal hello world program in python. Point taken, most of your programs will be more complex than hello world anyway, but you get the picture.

Not too many ways to do the same thing

Imagine a programming language that allows to write the same simple thing in a functional style or an imperative object oriented style or a logical style or whatever and its not at all obvious which one is better in this situation. What you end up with is either only one style prevails or you have very mixed programs and projects that are hard to understand. Naturally this is only sensible to a certain degree: Its OK (and for most programming models unavoidable anyway) to be able to write the factor function recursively or with an iterative loop. But having functional variants, structs/records, and object oriented classes as different concepts that do basically the same thing is redundant.

Cool syntax

Obviously we're now deep in the matter-of-taste region, but anyway: I never tried LISP. Why? Not because its so old or whatever, just because I was afraid of the ugly syntax. I'd really like something that is in between the C++'ish brace-style and the python'ish indentation style, i.e. a programming language that will understand your indentation but allows braces or whatever for clarification. Needless to say the syntax should be at least decidable so people have a chance to write usable tools for it.

No preprocessor

At least not in the C++ sense that doesn't understand the syntax at all. Syntactic macros are OK, but in general the language itself should be flexible enough to just let you do whatever you want without that additional step.


In terms of short run times of the programs, low memory footprint, etc...) is naturally desirable. Not for every application but the language wouldn't be "perfect" if it would produce darn slow programs.

Thats what I can think of off the top of my head right now. I'll write more about this topic in the future. E.g. I'll try to take a look at programming languages like Scala, Ocaml, Python, Dylan and some others. I don't know yet if I will really say anything about C++ and/or Java as you probably know enough about them anyway, but we'll see.

Friday, 2010-11-26 19:28 by Ordog
Take a look at Cobra while you are at it! Really impressive on paper! :)