views:

559

answers:

9

Duplicate of Learning to write a compiler and What are the best resources on designing a new language?

Can you point to what you think is the best documentation on creating a new programming language (--apart from the Dragon book, which I know of already). I am interested in both scripting language and general programming language design.

Let me clarify this a bit: I am interested in both language design documentation and language (i.e compiler) implementation documentation.

Are there any online walk-throughs by language designers, or any blog posts or articles describing the process and the tools (parser generators, gc libraries, etc) that they used?

Is there any book that describes the various stages of creating a programming language, preferably by its creator? You can also recommend generic books about language design (like issues with garbage collection, concurrency, generic programming, etc...)

Something having to do with LLVM would be especially appreciated.

(I have used the Dragon Book in the past to design and implement a very basic compiler of a C++ like language for a university course. That was about 10 years ago).

Please, no "why would one want to design a new language" answers.

A: 

Dragon book and the like are more concerned with compiler construction that with language design, IMHO.

As far as books are concerned, "Design and Evolution of C++" by Stroustrup fits your criteria.

Laurynas Biveinis
Yes, I clarified that in the question: I'm interested in both design and implementation (compiler construction), that's why I ask about "creating a programming language" (not simply designing or implementing).
foljs
+1  A: 

What about Ayendes Building Domain Specific Languages in Boo?

It's not exactly low level and not exactly pointed at creating whole new languages, but merely domain specific languages on top of other languages. It's quite interesting, and it does have a few good pointers to writings about creating domain specific languages not built on top of others too.

asgerhallas
+4  A: 
abababa22
+1  A: 

You asked for blogs too, so I'll add this wiki answer for a list of blogs:

ps. If you know a blog, but don't have the rep to edit it into this post, please add a comment so others can edit it.

abababa22
A: 

I am creating a progrmmaing language as part of a semester cource and we use the following books:

This one is very "hands on", but a bit old (2000) Programming language processors in Java

This one is more theoretic and a good supplement to the one above. Concepts of programming languages

hope you cacn use them.

jkjeldgaard
+2  A: 

You can find lots of material via Lambda the Ultimate, notably Getting Started.

Darius Bacon
A: 

See my answer here.

eKek0
+1  A: 
MissT
+5  A: 

(This answer focuses only on language design, not implementation.)

I do not think there is a good abstract approach to learning language design. At some point, you will want to learn how to write precise descriptions of programming languages and language features, but that is technical and may be demotivating at the start. So I recommend that you begin by studying great language designs. Here are three designs I consider great:

  • Lua, the world's best engineered scripting language
  • Icon, the most imaginative language ever designed for processing strings
  • CLU, the first language to take data abstraction (aka object-oriented design) seriously

I also think you well benefit from reading designers' accounts of their own languages. You will find some very interesting accounts in the ACM Conferences on the History of Programming Languages. For example, before I heard Dennis Ritchie speak about C, I was annoyed by C because it wasn't what I hoped for in an application language. After hearing Ritchie, I grew to love C for what it did well. It's all in the HOPL-II book!

Norman Ramsey
Lua refuses to accept that arrays and key->data mappings are different abstractions, and ends up with a nondeterministic "size" method. Yuck. It's mostly just another scripting language, though - I see little worth studying.
Steve314
Icon is a very interesting language (+1 for mentioning it), but the best idea (generators) got recycled in Python. Python isn't as "clean" at what Icon does well, but Icon doesn't do that much that well - Python is much better at getting things done. Icon having *only* its backtracking-triggering assertive comparison operators, and no boolean-returning comparisons, is clever but impractical, and part of what makes it good to study but bad to imitate too closely. CLU - can't comment, don't know it.
Steve314
http://www.cs.arizona.edu/icon/ibsale.htm - The Icon Implementation book. I don't know if it gives design rationales, but probably worth a look either way.
Steve314