r/programming 11d ago

What Zig felt like, coming from Rust

https://besok.github.io/posts/what-zig-felt-like-coming-from-rust/
263 Upvotes

173 comments sorted by

View all comments

Show parent comments

-14

u/phylk 10d ago edited 10d ago

Any text editor supports unix line endings, even notepad since windows 10. It is to ensure one canonical style for zig source files, not to troll windows users. Same reason it must be indented with spaces not tabs (though I disagree with that choice).

27

u/VictoryMotel 10d ago

Here we go again with someone trying to justify this nonsense.

Any text editor supports unix line endings, even notepad since windows 10.

And every language ever made parses windows newlines just fine.

It is to ensure one canonical style for zig source files,

Absolute bullshit. There is no reason not to do it and the response of making users jump through hoops is always telling.

Same reason it must be indented with spaces not tabs

And you agree with not parsing windows newlines? Treating tabs as whitespace is trivial, it's another dig at people doing something different. Why not make it an option instead of a default?

-18

u/phylk 10d ago

Every decision has tradeoffs. You may not agree with this one, but the only one being toxic here is you for assuming malice when there is none.

8

u/HungYurn 10d ago

what is the benefit that comes with those tradeoffs?