| ▲ | pjmlp 2 days ago |
| It has C style interfaces, meaning structs with function pointers. Which is basically how most device drivers in OSes that happen to be written in C, including UNIX flavours, work. |
|
| ▲ | metaltyphoon 2 days ago | parent | next [-] |
| We all know that OP wasn't asking about THAT kind of interface and more "please create vtables for me" style of interface |
| |
| ▲ | pjmlp 2 days ago | parent [-] | | That is too much compiler magic for Zig folks. | | |
| ▲ | AndyKelley 2 days ago | parent | next [-] | | You know, I used to be annoyed by all your consistently shitty remarks in any zig related HN thread, but these days, it's refreshing to have an unpleasant interaction with a human. Sincerely, thanks for all your hand-written hatred. | | |
| ▲ | pjmlp 2 days ago | parent [-] | | It goes both ways, when I see remarks regarding other languages from Zig community folks, not from you directly. Modula-2 like safety is still better than C will ever be, though. Yeah, it will be human as far as I can take it, cheers. |
| |
| ▲ | baranul a day ago | parent | prev [-] | | Perhaps it can be a relief to make assessments about a couple of newer C alternative languages[1][2]. Zen C appears to be moving up very quickly, and even has autofree. [1]: https://github.com/c3lang/c3c (C3) [2]: https://github.com/zenc-lang/zenc (Zen C) |
|
|
|
| ▲ | slopinthebag 2 days ago | parent | prev [-] |
| That's a hack, not an interface lol |
| |
| ▲ | lukaslalinsky 12 hours ago | parent | next [-] | | You would be terrified if you realized how the whole C-based GNOME/GTK ecosystem works :) | |
| ▲ | spiffyk 2 days ago | parent | prev | next [-] | | How is it a hack? I mean, you may not like the fact that Zig does not provide syntax sugar for interfaces, but how exactly do you think they are implemented in languages that do? | |
| ▲ | pjmlp 2 days ago | parent | prev [-] | | As plenty of other things in an "everything is explicit" language, whose goal is to be a safer C and nothing else. The "module" system is another hack. |
|