Better HN
topnewbestaskshowjobs
Log inSign up

alphazino

26 karma · joined Mar 22, 2020 (6y ago) · 8 submissions

Submissions

comment 4y ago · link · parent

I don't have experience with this area, but...

> this would require that unions can work on the 'bit level' in packed structs

Just as Zig has packed structs, it also has packed unions. So that part shouldn't be an issue.

comment 4y ago · link · parent

Do you have any links about that?

I did a quick search but didn't find anything substantial.

comment 4y ago · link · parent

Yes, but I think you missed the point of the parent comment.

> enabling developers to easily assign their own allocators

Through a combination of Zig's convention to pass around allocators instead of using a global allocator, the allocator interface's ability to return errors, and the Zig language forcing you to handle all errors (unless you explicitly discard them), a lot of Zig code is written with allocation failure in mind.

This means that you can seamlessly pass a custom allocator, say a bump allocator backed by a fixed buffer, to a function in some third-party library and still handle the case where the buffer runs out of space.

comment 4y ago · link · parent

> so they would be avoided if we had non-movable/non-copyable types.

There is a proposal for this that was accepted a while ago[0]. However, the devs have been focused on the self-hosted compiler recently, so they're behind on actually implementing accepted proposals.

[0] https://github.com/ziglang/zig/issues/7769

comment 5y ago · link · parent

it seems they changed it at some point.

https://web.archive.org/web/20200624213857/https://design.gs...

> c. The User may not use the Licensed Font Software to disparage or suggest any affiliation with or endorsement by Goldman Sachs.

(emphasis mine)

comment 5y ago · link · parent

(2019)

comment 6y ago · link · parent

https://wikipedia.org/wiki/Thin_client https://wikipedia.org/wiki/Fat_client

comment 6y ago · link · parent

I'm pretty sure cloudflare has a service called "Workers" and that this doesn't literally mean that their employees support COBOL.