Hacker News new | past | comments | ask | show | jobs | submit login

They already made a formatting tool that parses carriage returns and tabs. It's not exactly rocket science to not fail on tabs and carriage returns either.



Instead of complaining about in on Hacker News, how about you try to submit a patch to make it work? That strikes me as far more productive.


It isn't about doing the actual work, they make the zig compiler break on carriage returns and tabs for ideological reasons of annoying people on windows and people who use tabs. There is no technical barrier to making it work, it's just a giant red flag of bad judgement that anyone would do that.


If you look at [1] and [2] it's strikingly clear why not tabs, stage1 is for building one program that is the next state compiler so while it's possible to build other programs you're expected to wait for it's completion before all of the minor features (tabs, crlf, etc) are available. Also, I find that the "hard tabs" complaints are rather silly provided the following is stated on the wiki:

Hard tabs are not accepted by stage1 because:

- It doesn't need to. All of the self-hosted compiler source is formatted with zig fmt and so there are no hard tabs. The complexity of dealing with hard tabs need not be present in stage1.

- zig fmt is not fully stable yet; use of zig fmt is not yet ubiquitous. If stage1 accepted hard tabs, then in practice, there would be accidental mixing of tabs and spaces.

[1]: https://github.com/ziglang/zig/wiki/FAQ#why-does-zig-force-m... [2]: https://github.com/ziglang/zig/issues/544g




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: