News for hackers. Stuff that matters.
Re:Integrating “safe” languages into OpenBSD? by bluGill on Monday December 04, 2017 @10:10AM (#15844355)
C has a large advantage: you can write a compiler in machine language (not assembly, raw machine language) in a week. Not a good compiler: it will produce horrid, unoptimized code. You just need enough to build a good C compiler. From there you can build a c++ compiler, which in turn can build the C++ compiler you want.

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)

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)
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.