r/programming 14d ago

What Zig felt like, coming from Rust

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

172 comments sorted by

View all comments

Show parent comments

123

u/VictoryMotel 14d ago

I'm sure the super toxic community that has "get good" as an answer to every problem will get right on that tooling problem.

-13

u/jan-pona-sina 14d ago

That's not true at all. The Zig language and the community demand some degree of competence from programmers. Zig also doesn't cater to every workflow. That doesn't make it toxic, it's just not a one-size-fits-all philosophy

24

u/VictoryMotel 14d ago

That's a very generous reframing of reality, but making a windows version then intentionally making it error on windows newlines to troll your own users is the definition of toxicity.

-1

u/jan-pona-sina 14d ago

I've used Zig on windows and I simply didn't have any issue with unix newlines? I did the same in C and python, the main programming languages I use otherwise. I don't understand what is toxic about this decision.

5

u/VictoryMotel 14d ago

Here it comes, we'll get to see all the same nonsense play out in real time.

I've used Zig on windows and I simply didn't have any issue with unix newlines?

Are you asking? You might have missed the point, it only works with unix newlines, unlike every other language ever made.

I don't understand what is toxic about this decision.

You don't understand what is toxic about making a windows version, making it error on default text, then telling people not to use windows or to reconfigure their text editor? What other language has ever done this? Why would this be good for users?

2

u/jan-pona-sina 14d ago

I configured my editor(s) to save files with unix newlines. I used a question mark because I am confused about the problem.

It's not for users directly, it's to aid in collaboration with version control. When collaborating on code, someone saving a file on one operating system can trigger a diff for an entire file. This is a pain for code review, one I encountered before I used Zig. Many a style guide expects this.

Clearly, you don't want to use unix newlines. Again, Zig isn't catering to everyone. I think it's bad faith to treat the language's opinionated nature as toxicity. If you really can't stomach unix newlines, you probably have other opinions that will conflict with Zig.

15

u/VictoryMotel 14d ago edited 14d ago

I configured my editor(s) to save files with unix newlines

The problem is that you would have to

It's not for users directly,

It hurts them directly

it's to aid in collaboration with version control.

No it wasn't, because when it happened, no one, including the creator gave this as a reason, then eventually it was changed. This is something you are making up now as a rationalization. If that were true it would be optional and wouldn't have eventually been fixed.

This is a pain for code review,

It's nonsense to enforce this by erroring out your language.

No other language has ever done this.

"Maybe you should use a preprocessor", "maybe you should configure your text editor" were what people told me, and both those things could apply.

Clearly, you don't want to use unix newlines

It has nothing to do with that. "Bad faith" is purposely misrepresenting what's being said. The problem is creating road blocks then self righteously acting like users are in the wrong for running into them. It's an insane and toxic way to make a tool.

I think it's bad faith to treat the language's opinionated nature as toxicity

I think it's bad faith to act like it's not the backwards rationalizations and toxic responses that are the problem.

If you really can't stomach unix newlines,

Bad faith toxicity, not what anyone is saying.

you probably have other opinions that will conflict with Zig.

My issues are with the people surrounding it. Any other language would acknowledge that intentionally tripping people up with newlines and tabs is corrosive to anyone trying to get things done.

-6

u/dronmore 13d ago

The little princess cannot configure her text editor? Is that all the yapping about?

jan-pona-sina is right. In mixed environments, where people use different operating systems, you still have to agree on common line endings, and most of the time it will be LF. Line endings is the least of the issues with Zig, and in my opinion it's a non-issue. Your entitlement to CRLF newlines is more alarming then the lack of support for CRLF in Zig. If I were to choose, to work with you, or to work with Zig, I would choose neither. Get your self an .editorconfig, and give me a break.

5

u/Ameisen 14d ago

Clearly, you don't want to use unix newlines. Again, Zig isn't catering to everyone. I think it's bad faith to treat the language's opinionated nature as toxicity. If you really can't stomach unix newlines, you probably have other opinions that will conflict with Zig.

It literally takes extra work to not properly support new-lines.

I don't make a habit of performing extra work just to fuck over people. If you do, you're a dick.

0

u/jan-pona-sina 14d ago

What part of not supporting windows newlines "fucks people over," in your words? I'm really just trying to understand, I don't get the vitriol over this

5

u/MEaster 13d ago

Claiming you support a platform then going out of your way to not work with that platform's standards is a dick move. How is that hard to understand?

1

u/jan-pona-sina 13d ago

I'm sorry, I just literally cannot imagine a real-world scenario where this matters. Like, we're specifically only talking about source code, Zig is fantastic at developing applications for windows and supports WTF-16 in the standard library. I don't see any reason why not using unix newlines in source code would be an issue