

So, You Want to Write Your Own Language? (Walter Bright) - ScottBurson
http://www.drdobbs.com/architecture-and-design/so-you-want-to-write-your-own-language/240165488/

======
ScottBurson
These are good suggestions, Walter. Let me add a couple more.

Always think of your language as a compiled language even if you start out
just writing an interpreter. Otherwise you are likely to add features that are
very difficult to compile efficiently.

If you're trying to design a language for accessibility -- ease of use by
relatively inexperienced programmers -- be aware of the tradeoffs. For
example, weak typing, such as automatic conversions between strings and
integers, is commonly thought to make life easier for novices, but it can make
it much harder to build large reliable systems -- and if your language is
successful, it will wind up being used for large systems, regardless of its
suitability for that purpose. Conversions from strings and integers to
booleans have been a particular problem area. Make sure that comparison
operators are transitive and equality is an equivalence relation -- and if you
don't know what those terms mean, you need to study programming language
design before you attempt it yourself.

~~~
dllthomas
I mostly agree with this, but _" if your language is successful, it will wind
up being used for large systems"_ assumes somewhat particular definitions of
"success". The Logo language was successful in providing room for
experimenting with programming at a time that was comparatively inaccessible.
It was also successful in that it ran on quite a few machines and people paid
money for implementations. I would be mildly surprised if it has ever been
used for a large system, and tremendously surprised if this was prevalent.

~~~
ScottBurson
Okay, fair enough, there are different kinds of success. But I don't know that
Larry Wall or Rasmus Lerdorf would have predicted, in the early days of Perl
and PHP respectively, that their languages would wind up being used for large
systems -- and yet, they have been. This is the point I was trying to make.

~~~
dllthomas
Agreed.

