We were having a discussion about programming langauges and the concept of bootstrapping came up:
Each new version of Delphi is written in that version of Delphi too. The original compiler was written in C++ and Assembly. Once the compiler worked then it was used to rewrite the compiler in Delphi. I am sure much of the compiler is written in inline assemblier, which is a feature of the Delphi compiler. When a new version is under development, when they reach stable milestones they start developing in the milestone releases.
As I see it there are three benefits to writing a language in itself (if it is a general purpose language that this is applicable to)
Like Chris suggested it is the original unit test. At Microsoft they refer to this as "eating your own dog food" (I am not kidding). The idea is if you are using your product then you know it works or doesn't work, and you do a better job debugging it. For a general purpose programming language what better way then to write the language in itself.
This is really a side effect of the first benefit, but it is a instant testimonial for the language. If it is good enough to write itself in, then it must be good enough for project X. Like I said, this is a side effect.
As the language is improved then those improvements can be used to make the language better. This also explains how computers in general have an exponential growth - each new innovation is used to create the next. As Anders Hejlsberg put it ". . . .standing on the shoulders of giants," (maybe slightly out of context, but applies in principle). So if you decide to use language A to write language B then if you want to take advantage of a new feature then you must first update Language A to you can update Language B. You create twice as much work that way. So by putting in a little additional effort up front to bootstrap, you actually save work in the long run.
That is the way I see it at least.
Technorati Tags:[Programming][Software][Langauge][Bootstrapping][Delphi][Languages]
No comments:
Post a Comment