News for hackers. Stuff that matters.
Re:Zig's New Relationship with LLVM by CyberDildonics on Monday September 28, 2020 @10:51AM (#24617226)
Zig purposely does not parse carriage returns or tabs. When this is brought up, people tell you to use a separate program to format it before compiling and don't seem to acknowledge that this is not a problem with any other language.

The result is that by default you get errors on windows with hello world programs. People will tell you to just change your defaults in your text editor to not write carriage returns. There seems to be a lot of rationalizations from a very unpragmatic choice.

Re:Zig's New Relationship with LLVM by ikskuh on Monday September 28, 2020 @11:07AM (#24617431)
> When this is brought up, people [...] don't seem to acknowledge that this is not a problem with any other language.

This was a deliberate design decision by andrew for all zig pre-1.0 to supress discussions about coding style (use CR, LF, CRLF, LFCR as a line ending? tabs vs. spaces? ...) as it's considered bike shedding

Zig 1.0 won't have this restrictions anymore. More information can be found here:

https://github.com/ziglang/zig/wiki/FAQ#why-does-zig-force-m... https://github.com/ziglang/zig/issues/544

Re:Zig's New Relationship with LLVM by CyberDildonics on Monday September 28, 2020 @11:42AM (#24617843)
Why not do that with a formatting tool that applies to the compiler source instead of purposely breaking hello world on windows?
Re:Zig's New Relationship with LLVM by yamirui on Monday September 28, 2020 @05:32PM (#24621447)
Same answer as to why you don't configure your text editor to just not emit useless and outdated CR from past century - he has better things to do. And no, really, check out Zig repo's issue tab, he really has better things to do with his time on a project that's still evolving.

You're demanding 1.0+ usability from a language that's has yet to stand up on its own feet and is currently, unsurprisingly, 0.6.0 and won't be 1.0 any time soon because there's a massive amount of work that needs to be done.

This also isn't C and it wasn't developed/maintained for past 50 years.

Re:Zig's New Relationship with LLVM by CyberDildonics on Tuesday September 29, 2020 @09:16AM (#24627403)
Ignoring two different ascii bytes is not "1.0+ usability". The idea that it is a matter of work is an insane rationalization. Someone else said it is to prevent 'bike shedding'.

None of the backwards rationalizations people give actually makes sense, especially since it literally breaks any "hello world" program on windows. It's insane that people would try so hard to make excuses for such a basic disregard for new people.

Think about the reverse. Let's say tabs are treated as spaces and carriage return bytes are ignored. Who would ever argue that something should be changed to break these things?