2 ms·
This is great IMO. I like zig as a language and the idea behind it. But boy, it has a syntax issue. I with they figure out better syntax before 1.0, developer e
by tadasv 5mo ago
This is great IMO. I like zig as a language and the idea behind it. But boy, it has a syntax issue. I with they figure out better syntax before 1.0, developer ergonomics I think are as important.
- n42 5mo agohttps://matklad.github.io/2025/08/09/zigs-lovely-syntax.html https://matklad.github.io/2025/08/09/zigs-lovely-syntax.html
- lukaslalinsky 5mo agoZig has multiple issues, but syntax is definitely not it. It might take a little bit of time getting used to, if you are coming from another language, but it's one of the most readable languages I've ever worked with.
- benatkin 5mo agoThat is an opinion framed as a fact. There's plenty to rub a coder the wrong way, such as the sigil in builtin functions like @import, the dot syntax in structures (.{}, Timestamp{ .seconds = 0, .nanos = 0, };), triple slash comments (///), and multiline strings (beginning each with \\ - good luck grepping for escaped backslashes). However, that is just like any programming language - none is immune to this criticism.
- peesem 5mo agothe triple slash is only for doc comments, not normal code comments - those are still double slashes. also, why would you want to grep for escaped backslashes?
- seanclayton 5mo agoLisps have multiple issues, but syntax is definitely not it. It might take a little bit of time getting used to, if you are coming from another language, but LISPs are some of the most readable languages I've ever worked with.
- dtj1123 5mo agoCan you elaborate on what you find to be an issue?
- metaltyphoon 5mo agoFor me, anytype and the everything is public
- peesem 5mo agoall fields are public. declarations are private to the file they're in by default and then public if you choose to make them public
- metaltyphoon 5mo agoI guess I should have been more specific. I'm not a fan of fields all being public
- dtj1123 5mo agoYou're in luck regarding anytype: https://codeberg.org/ziglang/zig/issues/32099 https://codeberg.org/ziglang/zig/issues/32099
- lerno 5mo agoZig syntax has been mostly stable since 0.2, it is extremely unlikely it will change beyond tweaks. You have to go to Odin, C3 or (in the future) Jai for an alternative.