Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I am waiting for the milestone[1] for Zig to be able to bootstrap itself. Usually, this means the language is mature enough.

[1] https://github.com/ziglang/zig/projects/2



What are the advantages of this other than showing the language is competent enough that you can write a compiler for itself? Would it be better to keep a compiler written in a highly portable language such as c? Genuinely curious.


I think it is usually considered a right of passage of a new programming language to prove that it is mature enough to self-host.

Personally, I value that aspect highly because it means if I choose to work with a language that I can understand, read, and possibly contribute to the compiler if needed.


> Personally, I value that aspect highly because it means if I choose to work with a language that I can understand, read, and possibly contribute to the compiler if needed.

You would have about the same if the compiler were written in a lingua franca. For whatever it's worth, I have in the past had to work inside the gfortran compiler, and I wouldn't have been able to do that if it were written in Fortran.

Self-hosting (which nowadays often isn't "full" self-hosting, it's implementing a frontend and possibly parts of a mid-end only and letting a framework like GCC or LLVM do the rest) is useful because it proves that it has reached a certain level of maturity, as you say. Another advantage is that this gives you a non-trivial piece of software written in the language which can be used for testing and benchmarking. If you introduce a compiler bug, there is a certain likelihood that you will notice it immediately. This might not be the case if you only had small toy programs to test with.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: