News for hackers. Stuff that matters.
Re:A Zig Diary by fractalb on Wednesday January 11, 2023 @11:29AM (#34340285)
I don’t know zig, but I’d like to know if the syntax idiosyncrasies are warranted, or are they are designed just to be different from other languages? IMO using well established syntax makes life easy for a lot of new folks who want to learn this language.
Re:A Zig Diary by stephc_int13 on Wednesday January 11, 2023 @12:00PM (#34340850)
For any design decision, there is always a cost/benefit tradeoff.

In this case, I think the design team might be underestimating the cost of those idiosyncrasies, simply because they've been working with them for so long.

It is hard to keep a fresh eye on a product of any kind when you've spent years looking at it, designer blindness is not something that should be ignored.

Re:A Zig Diary by AnIdiotOnTheNet on Wednesday January 11, 2023 @01:56PM (#34342789)
From my interactions with the Zig dev team, I don't think that's an accurate assessment. They spend a long time thinking and talking about the tradeoffs of doing things the way they are doing them vs more traditional routes and, in my opinion, they usually make a solid well reasoned decision based on Zig core principles.
Re:A Zig Diary by stephc_int13 on Wednesday January 11, 2023 @02:43PM (#34343499)
I agree, they explain almost every big design decision and the process seems to be mostly rational and thorough.

But still, it does not really account for their own blindness.

In practice we can rationalize almost everything.

Re:A Zig Diary by AndyKelley on Wednesday January 11, 2023 @05:02PM (#34345623)
I read feedback, but I can't do anything with a general phrase like "syntax idiosyncrasies". I need concrete examples to understand the problem.
Re:A Zig Diary by fractalb on Thursday January 12, 2023 @01:01AM (#34349770)
First of all thanks for Zig. I like your work. As I said, I don't know Zig. I read the OP's article and saw these: std.debug.print("{s}\n", .{arg}); vs std.debug.print("{s}\n", arg); // This is intuitive coming from other langs. and std.debug.print("I just want some output\n", .{}); // Not at all expected .{}

There might be good reasons why they are designed like that, but we outsiders find that syntax idiosyncratic.