I have been giving some thoughts on what an ideal language would be like and have come up with the following list.

Flexibility.  There is no one ideal language.  Design, like many other fields, has always been about deciding between 2 alternatives.  What is good in one instance may be horrible in another.  Therefore, flexibility is important to make the language fit to the task.  This means there are mulitple ways of doing things.  It also means you can build the language up to the task.  Lisp and Forth based languages are commonly programmed in this manner.  To achieve this goal I believe the language will need to be circular and homoiconic.

Simplicity.  The most elegant solutions are usually the simpliest as well.  This could be thought of as the RISC of programming languages.  Again, languages like Lisp are known for their simplicity.  There is very little syntax to learn and yet it is very expressive and powerful.

Support for meta programming.  I’m not sure if this should be built into the language or if the flexibility of a language will automatically allow for it.  The latter would be more elegant.  Often when programming I find myself doing the same thing over and over again.  So called design patterns are often just artifacts of a language that doesn’t allow you to express your intent succintly.

Homoiconic.  This basically means the language data structures of the language are the language itself.  Lisp and Factor have this in common.

Multi-fix Syntax.  Postfix, prefix, infix should be allowed whenever it is most convenient to do so.  Each programming task may be written better in one of these forms.  The language should not be restricted to only 1 of them.

Dynamic Syntax.  This goes along with flexibility.  You should be able to configure the langugae / environment that best fits the task at hand.  Perhaps this means lots of languages in one (all of them homoiconic and sharing the same code contsructs internally).

Intentional Programming.  I’m not going to define what this is here.  You can google it to find out more about it.  The basic idea I want to borrow from it is that programming should not be about text only code.  You should be able to use tools and construct tools to create what you need.

Macros.  This may or may not be needed depending on how usable the langugae is already.  I need to spend more time working with Lisp to really understand how they are used and if they should be adapted to my language.

Interpreted.  There is tremendous flexibility and power when a language is interpreted.  Many things are simplified.  Speed and code security are the obvious drawbacks.

Runs inside common environments.  PHP, Javascript, Actionscript, and Java are the languages of the web.  If the environment is built to run inside these environments you gain all the API from them.  It is also much easier to deploy and distribute to others if you have a kernel that can easily be installed without any sysadmin work.  This will allow products to be sold without the need of complex environment requirements.

Mix environment with code.  I’m thinking of Squeak, the Factor listener, and Intentional Programming here.  Programming should not be about working with text only.  Often this is the only way it is done.  There is no reason why it needs to be that way.  There is much to be gained if we allow an environment to directly access the constructs of the language directly.

Posted Sunday, February 8th, 2009 at 9:25 pm
Filed Under Category: Design Issues, Language Features
You can leave a response, or trackback from your own site.

2

Responses to “Language Goals”

Hostile Fork

This is a good list! Your attempt to inventory the factors for a new “ultimate” language environment reminds me of a page I happened across called the “Tunes project”:

http://tunes.org/overview.html

They prioritize “reflection” as “the practice of writing introspective and self-modifying software”. I’m truly amazed how many language systems were built with little support for doing this easily—considering that programming is all about automating repetitive tasks!

So I’ve written a couple of articles about a language that might interest you (to study its ideas, if nothing else.) It’s called REBOL…and there’s a bit of a 3-blind-men-and-the-elephant situation; which part of it you grab at first will make it seem like something you’ve seen already, but it’s an animal of its own.

It’s LISPish because the language syntax is token series in nested brackets. Beyond representing the program, it’s the foundational structure you use for storing your program’s data. But it has a novel iterator model which applies to many of its data types:

http://hostilefork.com/2008/09/05/the-flexible-series-as-a-core-concept-of-rebol/

There’s a little bit of parsing needed to turn a string into the internal format, but fortunately there’s a basic operation in the language that does this work for you. It makes it a little easier for me to stomach an interpreted language if I know I can easily write my own utilities that will be able to read and audit the source.

Just thought I’d give you a pointer. Anyway, glad some folks in the blogosphere are keeping an eye on metaprogramming and alternative languages… good luck!

Leave a Reply

You must be logged in to post a comment.