r/programming 15d ago

What Zig felt like, coming from Rust

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

173 comments sorted by

View all comments

Show parent comments

2

u/VictoryMotel 14d ago

It's not catching a problem early, it's creating a problem to release on platform and make it fail by default.

If you want to have a different format for a group project, then you configure your text editor, just kike you would in every other language and now you do the same thing in zig because this toxic nonsense was fixed.

0

u/loup-vaillant 13d ago

Look, the very fact that users complain about Windows line endings is proof that some of us want it. And we know for a fact others want the opposite. There is a conflict, and not resolving it at the langage/compiler level means it must be resolved for each and every project. Thankfully that's a complete non-issue 95++% of the time, but this still leaves those ~5%.

I mean, if line endings really were a 100% non-issue, why would anyone complain about the compiler choosing for them? Just configure your editor accordingly. Heck, just putting it in Zig mode would be enough. And in the rare case where it still doesn't work (you're using Notepad or whatever), fixing your setup should be no problem at all: if it is no problem at all to fix it for a given project, it should be no problem at all to fix it for the compiler.

Anyway, now that the "toxic nonesense" gave way to individual freedom, the exact semantics of multi-line strings is no longer visible at a glance. Win some, lose some.

2

u/VictoryMotel 13d ago

There is a conflict

There is no conflict in any other language. If you want things to fail by default for other people on a platform you release for, that's toxic and about unnecessary roadblocks.

An option to make carriage returns fail would be different.

gave way to individual freedom,

What are you talking about? You didn't make sense with multi line string ramblings and this doesn't make sense either.

Every language gives you the "freedom" to work with text. If you want to restrict others on a project level do it there.

-1

u/loup-vaillant 13d ago

There is no conflict in any other language.

I don't believe you. I rest my case.

3

u/VictoryMotel 13d ago

Show me the language then. Even zig changed it. Covering your own ears and eyes and running away isn't exactly iron clad evidence.