I hope that we're not stuck writing piles of low-level code for all eternity. We don't need more than a few pages of each low-level language, and while I do really like Zig's qualities compared to C, I'd still like to minimize the amount of Zig or C total that has to be written. I think that our community's equivalent of "where's my flying car?" is "where's my higher-level language?"
Interview with Zig language creator Andrew Kelley [video]
11–20 of 210 posts
Re: Interview with Zig language creator Andrew Kelley [video]
#12I hope that we're not stuck writing piles of low-level code for all eternity. We don't need more than a few pages of each low-level language, and while I do really like Zig's qualities compared to C, I'd still like to minimize the amount of Zig or C total that has to be written. I think that our community's equivalent of "where's my flying car?" is "where's my higher-level language?"
I think that's a valid point that needs to be made in this conversation, and it's super-sad that somebody downvoted you for it. I've spent much of my career writing low-level code in low-level languages because I had to, usually in C and usually because I was in resource-constrained environments where tight control over CPU and memory footprints was necessary. There's absolutely room for languages that improve progra…
Low-level languages encourage the use of clean ownership patterns, which ultimately leads to cleaner design.
Re: Interview with Zig language creator Andrew Kelley [video]
#13I hope that we're not stuck writing piles of low-level code for all eternity. We don't need more than a few pages of each low-level language, and while I do really like Zig's qualities compared to C, I'd still like to minimize the amount of Zig or C total that has to be written. I think that our community's equivalent of "where's my flying car?" is "where's my higher-level language?"
Who's the "we" who are "stuck"? The vast majority of programmers don't use low-level languages for writing applications even today, but there is a big niche of domains where close to perfect control is needed and that's the domain low level languages like C, C++, Ada, Rust and Zig try to address. I wouldn't (and don't) write "ordinary" applications in those languages, but I don't think the domains they target will ev…
I work in a multi-million-line codebase, a significant majority of which is very far from that "need perfect control" domain but is written in a what I'd call a mid-level language - a high-abstraction dialect of C++. So I'd say GP is correct, that too many people are stuck writing code in the wrong language for the task at hand. The need for languages like Zig to improve the lower-level experience (which, as you say, is not going away) and the need for higher-level languages for more common types of programs are not in conflict. They're complementary. It's the mid-level languages that need to DIAF, because they're not really suited for either and pretending to be more general than they are only encourages people to make choices that hurt them.
Re: Interview with Zig language creator Andrew Kelley [video]
#14Re: Interview with Zig language creator Andrew Kelley [video]
#15Earlier quoted context omitted.
Who's the "we" who are "stuck"? The vast majority of programmers don't use low-level languages for writing applications even today, but there is a big niche of domains where close to perfect control is needed and that's the domain low level languages like C, C++, Ada, Rust and Zig try to address. I wouldn't (and don't) write "ordinary" applications in those languages, but I don't think the domains they target will ev…
> The vast majority of programmers don't use low-level languages for writing applications I work in a multi-million-line codebase, a significant majority of which is very far from that "need perfect control" domain but is written in a what I'd call a mid-level language - a high-abstraction dialect of C++. So I'd say GP is correct, that too many people are stuck writing code in the wrong language for the task at hand.…
Re: Interview with Zig language creator Andrew Kelley [video]
#16I hope that we're not stuck writing piles of low-level code for all eternity. We don't need more than a few pages of each low-level language, and while I do really like Zig's qualities compared to C, I'd still like to minimize the amount of Zig or C total that has to be written. I think that our community's equivalent of "where's my flying car?" is "where's my higher-level language?"
Re: Interview with Zig language creator Andrew Kelley [video]
#17Particularly great is Zig's handling of both macros and generic types, the answer to both of which seems to be: just evaluate them at compile-time with regular functions, no special DSL or extra syntax. Andrew mentions in the video a big drawback of this system - implications for IDE complexity and performance. I imagine the performance side of this could be (maybe is?) mitigated by limiting recursion depth/loop counts for compile-time work.
I'm not particularly interested in taking on a language with manual memory management and the responsibilities it entails, but I would love to have access to Zig's compile-time capabilities, if it were available with some more memory safety.
Re: Interview with Zig language creator Andrew Kelley [video]
#18Earlier quoted context omitted.
I think that's a valid point that needs to be made in this conversation, and it's super-sad that somebody downvoted you for it. I've spent much of my career writing low-level code in low-level languages because I had to, usually in C and usually because I was in resource-constrained environments where tight control over CPU and memory footprints was necessary. There's absolutely room for languages that improve progra…
It'd argue that the constraints of writing lower-level code can actually lead to producing better code. For instance, idiomatic C, Rust and Zig is to pass a buffer into some function, that it then fills, and the caller handles the output. This leads to having more pure, side-effect free functions, compared to the approach some higher-level languages will take of having the function allocate some stuff in its body, pr…
Re: Interview with Zig language creator Andrew Kelley [video]
#19I hope that we're not stuck writing piles of low-level code for all eternity. We don't need more than a few pages of each low-level language, and while I do really like Zig's qualities compared to C, I'd still like to minimize the amount of Zig or C total that has to be written. I think that our community's equivalent of "where's my flying car?" is "where's my higher-level language?"
Who's the "we" who are "stuck"? The vast majority of programmers don't use low-level languages for writing applications even today, but there is a big niche of domains where close to perfect control is needed and that's the domain low level languages like C, C++, Ada, Rust and Zig try to address. I wouldn't (and don't) write "ordinary" applications in those languages, but I don't think the domains they target will ev…
Burroughs, Mesa, Modula, Oberon, Interlisp-D,... were on the right path, but in technology not always the best ideas win.
Re: Interview with Zig language creator Andrew Kelley [video]
#20Earlier quoted context omitted.
It'd argue that the constraints of writing lower-level code can actually lead to producing better code. For instance, idiomatic C, Rust and Zig is to pass a buffer into some function, that it then fills, and the caller handles the output. This leads to having more pure, side-effect free functions, compared to the approach some higher-level languages will take of having the function allocate some stuff in its body, pr…
I have a lot of sympathy for that position. The thing that drives me nuts about the codebase I work in now is that it has idioms that involve "promiscuous" memory allocation and then more idioms to fix/cover it up. I'm fine with languages that require completely manual memory allocation (spent most of my career in C). I'm also fine with languages that totally take that burden away. There are tradeoffs either way, but…
Maybe the authors of that code just had different priorities, such as maximising compilation time.