Viewing profile — Spex_guy
Spex_guy
HN member- Joined
- Sun, Aug 09, 2015, 3:32 AM UTC
- HN karma
- 71
- Public activity
- 22 items
- HN profile
- View on Hacker News ↗
About Spex_guy
No profile information was provided.
Recent public activity
-
comment
Comment #35706346
> If the type system is uncomputable, then the type system will never be able to resolve all uses of function pointers everywhere. Can you elaborate on what you mean here, and the …
-
comment
Comment #31056369
> What kind of tests are these "behavior test"? Snippets of zig code that use language features and then make sure those features did the right thing. You can find them here: https…
-
comment
Comment #31056319
The compiler adds a tag in debug modes, but not in release modes.
-
comment
Comment #29632603
Parsing this out of utf-8 encoding requires no knowledge of unicode or even utf-8. All of the relevant characters (reverse solidus, quotation mark, and control characters) are sing…
-
comment
Comment #29632515
The UTF-8 encoding is designed so that this is usually not a problem. If you do a search in a utf-8 encoded byte array for an ascii character, for example, you can never get a fals…
-
comment
Comment #29632342
I can't comment for all the other people who are posting and voting for those posts, but at least for me Zig has quickly become my language of choice for side projects. Its cross c…
-
comment
Comment #29632168
Hard to say, 1.0 for us comes when everything is fully stable in both the language and standard library, and we believe that it can last at least 20 years without modification. My …
-
comment
Comment #29632140
We currently don't advise using the Zig language in production. The compiler has known bugs and even some miscompilations, and we sometimes make breaking changes to the std lib and…
- comment
-
comment
Comment #29574101
Yes, move semantics were added because the language was considered incomplete without them. In particular, because RAII based resources like std::vector could not be relocated with…
-
comment
Comment #29574071
Memory is typed in C++. You must use placement new to imbue memory with a non-POD type, and that memory continues to have that type until its destructor is invoked. This is what al…
-
comment
Comment #29573568
Ah interesting, yeah I suppose if we define "RAII" as just "automatically invoked configurable cleanup", there's no actual need to mark the beginning of the lifetime. All you need …
-
comment
Comment #29573461
This is a worry, but it's not as bad as you might initially think. The first thing to notice is that even though the "interface pointer" got fatter, the implementation got much lea…
-
comment
Comment #29573354
It's true that language specific IRs are more powerful, but that isn't the problem in this example. Interfaces aren't part of Zig at the language level, nor are object lifetimes ov…
-
comment
Comment #29573195
Zig's build model is mostly to combine everything into one compilation unit (from multiple files). Since Zig doesn't have a preprocessor, the compiler can reason about incremental …
-
comment
Comment #29572970
Haha yeah this is a good insight. "Resource Acquisition Is Initialization" actually has nothing to do with resource acquisition or initialization in most peoples' minds, instead pe…
-
comment
Comment #29572722
That's a fair criticism, I think C++ blurs a lot of lines that make these things difficult to talk about in isolation, and I'm still working on being more rigorous about picking th…
-
comment
Comment #29572454
I don't mean that these things need to manifest in exactly the same way as they do in C++, but analagous features are needed. You're right that rvalue references are not necessary,…
-
comment
Comment #29572430
It depends a lot, but in practice in Zig devirtualization is effectively constant propagation. The compiler needs to see the place where the vtable is created, and follow that to t…
-
comment
Comment #29571872
It's unlikely. RAII comes with a surprising amount of complexity. In order to have a reasonably complete language that has RAII and value types, you must also have: - constructors …
-
comment
Comment #29542274
Your instinct is right about array types, semantically in Zig they are passed by value. Parameter values are always const though, which allows the compiler to sometimes use pass-by…
-
comment
Comment #29542230
The process of adding new versions of glibc to the data set is described in the readme. If something changes in a way the format doesn't handle, we can just change it and update th…