logoalt Hacker News

int_19htoday at 12:25 AM1 replyview on HN

What is "generally accepted" though?

If you mean C-style declarations, the fact that tools such as https://linux.die.net/man/1/cdecl even exist to begin with shows what's wrong with it.


Replies

kachapopopowtoday at 12:41 AM

<auto/type/name> <name/type> (array?) (:)= (value)

<fn> <generic> <name>(<type/argument>[:] <type/argument> [(->/:) type]

[import/use/using] (<package>[/|:|::|.]<type> | "file") (ok header files are a relic of the past I have to admit that)

I tried writing zig and as someone who has pretty much written in every commonly used language it just felt different enough where I kept having to look up the syntax.