top | item 37900703

(no title)

schwoll | 2 years ago

Keep in mind C is just basically assembly but encapsulated in a pretty package. If you create small executables and dump out the generated unoptimized assembly you'll be surprised just how simple it is. It pretty much just encapsulates the ideas of System V binary compatibility and then keeps going. So developing a language from scratch and skipping the use of C would really likely be just causing yourself more pain than you need as you're going to have to replicate all of the things C does anyways, so why not reuse what the experts have already done. And you get a lot of cross CPU and cross compiler portability.

What you want is the idea of bootstrapping. Write your compiler in C, then as your language specification is developed enough, dogfood your own compiler. Write your compiler in your new language, then compile itself. This is called bootstrapping and is how many languages are developed. Once you are fully bootstrapped you can drop C altogether.

discuss

order

No comments yet.