Re:Integrating “safe” languages into OpenBSD?
by stepik777 on Monday December 04, 2017 @11:43AM
(#15845199)
> large advantage
How is this a large advantage? When was the last time someone actually did this?
Re:Integrating “safe” languages into OpenBSD?
by qznc on Monday December 04, 2017 @05:50PM
(#15848297)
In my experience, a new toy c compiler pops up roughly once a year.
https://github.com/Wilfred/babyc http://www.sigbus.info/how-i-wrote-a-self-hosting-c-compiler... http://zserge.com/blog/cucu-part1.html https://c9x.me/qcc/ https://github.com/alexfru/SmallerC
Re:Integrating “safe” languages into OpenBSD?
by kelnos on Monday December 04, 2017 @09:43PM
(#15849370)
Sure, and most people do this as an exercise, whether it's to learn how to write a compiler, or to see how small they can make the compiler, or something like that. No one does it because they really have a strong practical need to.
Re:Integrating “safe” languages into OpenBSD?
by pjmlp on Monday December 04, 2017 @05:54PM
(#15848340)
That so called advantage is how Niklaus Wirth did all his compilers, and many other language designers, it is not unique to C.
Re:Integrating “safe” languages into OpenBSD?
by bluGill on Tuesday December 05, 2017 @10:24AM
(#15852238)
I didn't mean to imply it was unique to C, though in hindsight I did. This can be done in many languages.
I believe that Niklaus Wirth created his first self hosting implementation in a small subset of the language and expanded from there. Anyone thinking about doing this for a non-trivial language should consider following that example.
Every time you add a new language feature you increase them time to write your bootstrapping compiler. Garbage collection means you will spend a few more months building a garbage collector. (remember we are writing in machine language so most of the abstractions you are used to dealing with - even in assembly - are missing. Thus complexity is growing exponentially)