views:

84

answers:

2

When I read about different computing languages on here, I always wonder what motivated the original decision to develop something new instead of just extending a language which already exists.

Question: How does someone go about 'designing' a new programming language and how do they decide objectively which choices to make?

If there are any free online tutorials on this topic I would love to hear about them so that I can lean more.

+3  A: 

This might not be considered a "tutorial", but you might find the information here useful. It is specifically about designing a programming language, not about compilers or anything. Hovewer it might be too academic. In that case, you might find valuable information here (the postscript language).

I know you asked for free online tutorials, but anyway I recommend this book too.

PeterK
+5  A: 

There's many different motivations for designing new programming languages. Perhaps you want to try out new concepts (smalltalk and objects-- yeah Plato!) and explore different paradigms (logic, functional, imperative). Maybe you want to overcome perceived shortcomings in previous languages (support currying instead of relying on Adapter pattern). Sometimes a language isn't suited for elegantly adding the features you want or need (anyone program OOP in C++ lately?). Maybe you want a higher level of abstraction (thank god we didn't just keep expounding assembler!), or a domain-specific problem that could be better solved with a new language. The list goes on.

As far as objectively making choices as to what to include, I dunno if anyone does that. There's so much subjectivity in practically everything that's out there. Guido van Rossum values readability, hence forced-block indenting in Python. Brendan Eich was heavily influenced by functional languages so theres higher order functions and closures in JavaScript.

There's a lot of information available on the internet for writing programming languages and compilers and whatnot. Unfinished and outdated but a low-impact approach is Crenshaw's Let's Build a Compiler. http://compilers.iecc.com/crenshaw/ and pick yourself a copy of the dragon book for some heavy, in-depth, theoretical but important reading http://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811

But as to what you put in the language? That's up to you! You might find http://research.microsoft.com/~simonpj/papers/history-of-haskell/history.pdf and http://developer.yahoo.com/yui/theater/video.php?v=crockonjs-2 interesting reading and viewing to get a taste of what sort of thought and politics go into making language decisions. Hang out and http://lambda-the-ultimate.org/ or http://groups.google.com/group/pilud and get involved in some of the discussions.

Think about what important beliefs you hold about programming. Is OOP the holy grail? Or is functional programming the way to go? What pisses you off the most about the languages you you on a daily basis and what would you do to make it better for you and your coworkers? What concepts and tasks do you find difficult to express and accomplish in the languages you know? Make the world a better place and fix them!

Timothy
PS: Also ran across http://wiki.github.com/graydon/rust/language-faq which may be interesting reading as well, specifically any questions in the "Specific Language Issues" section.
Timothy
Thank you, this gives me a good idea at what to start looking at.
Christine Forrester
you're welcome :)
Timothy