Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

6. AWK > Designing a New Language

Designing a New Language

How would you go about creating a new programming language?

Brian: Presumably you have some set of tasks, some domain of application, for which you think a new programming language would be better than any existing language. Think about what people want to be able to say. What are the problems, the applications, that this programming language is going to be used for? How would you like to express them in that language? What would be the most natural way to write them down? What are the most important examples, the simplest ones that would get somebody started? Try to make those as straightforward as possible.

Fundamentally, the idea is to try to write things in the language before it exists. How would you say something? I think this applied to AWK pretty well because everything in the design of that language was intended to make it easy to write useful programs without having to say very much. That meant we didn’t have declarations, partly because we didn’t have types. It meant that we didn’t have explicit input statements because the input was completely implicit, it just happened. It meant that we didn’t have statements for splitting input lines into fields because that happened automatically. All the properties of the language came from the goal of trying to make it really easy to say ....


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint