Earlier quoted context omitted.
Zig's worth it though. I don't care for libraries that aren't maintained anyway. If they don't maintain it, it's just bad anyway. Why do you always nag about Zig. Stop shilling your C3 here.
This kind of thought is popular in the web world where browsers get an update every 3 days and you don't control the hosting services, so constant maintenance is unavoidable. But in the world of desktop development it's possible for a library to be "done", having a 100% stable codebase going forward and requiring no maintenance. And it's not bad, it's actually good. Requiring every dependency to be constantly maintai…
Type resolution redesign, with language changes to taste
231–240 of 284 posts
Re: Type resolution redesign, with language changes to taste
#232Earlier quoted context omitted.
C++ added OOP to C. Rust is not object-oriented. That makes your statement wrong.
Objective-C added OOP to C. C++ did not. C++ is neither an OO language nor a C superset.
Re: Type resolution redesign, with language changes to taste
#233What makes zig special as a language? I have the impression that it has quite a large fan base here on HN but don't really hear any talks about it anywhere else.
If you're willing to dive right into it, I'd first read a bit about the comptime system [0] then have a go at reading the source for `MultiArrayList` [1], a container which internally stores elements in SoA format.
At least, that was what got me interested.
[0]: https://ziglang.org/documentation/master/#comptime
[1]: https://codeberg.org/ziglang/zig/src/branch/master/lib/std/m...
Re: Type resolution redesign, with language changes to taste
#234I would really like to hear from people using Zig in production/semi-serious applications; where software stability is important. How's your experience with the constantly changing language? How're your update/rewrite cycles looking like? Are there cases where packages you may use fall behind the language? I know Bun's using zig to a degree of success, was wondering how the rest were doing.
Re: Type resolution redesign, with language changes to taste
#235Earlier quoted context omitted.
Originally, Zig's type system was less disciplined in terms of the "zero" type (also known as "noreturn"). This was proposed, discussed, and accepted here: https://github.com/ziglang/zig/issues/3257 Later, Matthew Lugg made a follow-up proposal, which was discussed both publicly and in ZSF core team meetings. https://github.com/ziglang/zig/issues/15909 He writes: > A (fairly uncontroversial) subset of this behavior w…
Thanks for the reply Andrew, I certainly did not mean to imply any issues with trustworthiness for Zig users or prospective adopters. Also, I absolutely did not intend to imply any negatives toward Zog’s evolution or this particular development on the compiler’s internals. I enjoy all of the process and implementation content, i.e. videos, podcast, and blogs that yourself and contributors have provided through variou…
Re: Type resolution redesign, with language changes to taste
#236Congratulations to the dev, a 30,000 line PR for a language compiler (and a very much non-trivial compiler) is a feat to be proud of. But a change of this magnitude is a serious bit of development and gave me pause. I understand both of the following: 1. Language development is a tricky subject, in general, but especially for those languages looking for wide adoption or hoping for ‘generational’ (program life span be…
Originally, Zig's type system was less disciplined in terms of the "zero" type (also known as "noreturn"). This was proposed, discussed, and accepted here: https://github.com/ziglang/zig/issues/3257 Later, Matthew Lugg made a follow-up proposal, which was discussed both publicly and in ZSF core team meetings. https://github.com/ziglang/zig/issues/15909 He writes: > A (fairly uncontroversial) subset of this behavior w…
Re: Type resolution redesign, with language changes to taste
#237Earlier quoted context omitted.
Objective-C added OOP to C. C++ did not. C++ is neither an OO language nor a C superset.
If you make up your own definitions things can be anything you want and have or not have any label.
And yes, we all know the rest of the story about how the C++ guys were butthurt by that callout and have been on a mission to make up their own pet definition that allows C++ to become "object-oriented" ever since. I mean, who wouldn't want to latch onto a term that was about the unique features of a failed programming language that never went anywhere?
Re: Type resolution redesign, with language changes to taste
#238I wonder if this ends up similar to C++ template rules where the surface looks small but the edge cases accumulate over time.
Re: Type resolution redesign, with language changes to taste
#239Instead of implementing a workaround for types as namespaces, wouldn't it better to explicitly add namespaces to the language?
It's not so much a workaround as it is an elegance in design. In Zig, when you @import a file, that file is converted to a struct with comptime fields for all of the public members. Similarly, a "namespace" in Zig is just a nested struct with more fields. Usually it's just another import of something else. N.B.: Coffee hasn't reached my bloodstream yet; accuracy not guaranteed.
Re: Type resolution redesign, with language changes to taste
#240It’s good to see that this is finally addressed. It’s been a well known broken part of the language semantics for years. There are similar hidden quirks in the language that will need to be addressed at some point, such as integer promotion semantics. To address the question about stability: the Zig community are already used to Zig breaking between 0.x versions. Unlike competitors such as Odin or my own C3, there is…
what is the problem with zig being developed for 10+ years? if people want stable languages there are stable languages to be used. if a language like zig is not achievable in less than 10 years, should it just not be developed from the start?
i think your problems with build.zig are overstated. where do you see someone saying "to build your first Hello World, first understand this build script in non-trivial Zig"? you can literally just do `zig run file.zig`, so if someone is advocating for that then i think many would agree they are teaching the wrong way. i wonder if you saw an example project with a build script that was intended to show the power and possibilities of Zig rather than to be a starter guide.