I really enjoy programming language design. Sometimes I think my language projects and their potential users would benefit from a comprehensive standards document. I've looked at many language standards, ranging from the very formal (C++) to the rather informal (ECMAScript), but I can't really get a handle on how I should break things down and organise such a document, even though I think I'm pretty good at technical writing in general.

Should I write it like a long tutorial, or more like a formal math paper? How do I keep it up to date if I'm developing it alongside a reference implementation? Should I just give up and treat the implementation and documentation as the de facto standard? Further, is there really any significant benefit to having a standard? Does requiring a standard mean that the language is needlessly complex?

Your list of suggestions is very helpful. I think what I'm going to do is brainstorm a similar list, sort it in tutorial-like format, and write a brief informal spec with a few formal addenda such as an EBNF grammar. I'll also definitely have another look at the specs you mentioned for ideas.
–
Jon PurdyDec 3 '10 at 23:27

He goes into a lot of practical depth about why you should design a language

There are details on how to do it (parsers, lexical analysers, language workbenches etc)

There are detailed implementation instructions about how your chosen syntax can be made to handle concepts like closures, annotations, literal lists, dynamic reception etc

As for how to go about writing your specification, think about your audience. Obviously, before putting finger to keyboard to design your language you will have thought carefully about what it is intended to do.

If it's a new, interpreted language to replace JavaScript then you'll be wanting a very laissez faire approach in order to reach web developers with a limited attention span and a desire for immediate results - or quicker if possible.

If it's going to be used on the next mission to Titan, then extremely detailed specifications showing exact formal proofs of the behaviour of each component will be the minimal entry level.

So, it's not a straightforward thing. To approach the specification, you would probably be better off gaining a lot of experience in creating your languages and also working with those who actually use them on a day to day basis. If you have willing victims... er... developers, at work who can take some time to learn your language then they can give you feedback on what is needed to get them to use it.

Thanks for this. I have a lot of experience developing languages, and even documenting them rather thoroughly, but it's the idea of a standard that consistently gets me. I may just have to pick up the recommended reading and experiment a bit.
–
Jon PurdyDec 3 '10 at 20:36

@Jon Purdy Do you have any examples of the languages online that you could include in the question?
–
Gary RoweDec 3 '10 at 20:41

@Jon Purdy Vision looks interesting - a sort of souped up Velocity. As an aside, you might want to consider a YouTube screencast showing how to install it and write an example small website (say for a local plumber). This would make the learning curve much easier since people can see it in action and immediately take on the benefits. You can talk around the benefits in comparison to JSP, Velocity, ASP.Net, Freemarker etc
–
Gary RoweDec 3 '10 at 21:20

That's a good idea; I've been making YouTube videos a lot lately (around three a week), so I think I could definitely fit one in.
–
Jon PurdyDec 3 '10 at 23:24

Common Lisp and Haskell have language standards. Ruby and Python have implementations and documentation. So I would say that a language standard is not necessary, but it might be helpful if you expect there to be more than one implementation of the language you're designing. On the other hand, a standard is premature if you're expecting significant changes in your language definition.

Actually, Ruby has two things that could be considered "specifications". There's the ISO Ruby Specification, which is currently in its Final Draft state and which is being written by some people who have experience with language specifications (having worked on ANSI Common Lisp and ISO C++). And there is the RubySpec project, which is a set of RSpec-style executable examples forming both a human-readable specification and a machine-executable conformance testing suite for that specification.
–
Jörg W MittagDec 5 '10 at 1:35