<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: mlugg</title><link>https://news.ycombinator.com/user?id=mlugg</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Fri, 17 Apr 2026 00:34:17 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=mlugg" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by mlugg in "Zig 0.16 Milestone Completed"]]></title><description><![CDATA[
<p>> the build for x86_64 Linux failed.<p>Hm, are you referring to the CI failure on the x86_64-linux-release CI job on the current tip of master on the main Zig repository? That one's a flaky test, not indicative of a serious problem. (We usually just disable flaky tests, but this particular one I'm leaving on for the moment to try and gather a little more information about it.)<p>The tarball builds for the 0.16.0 release are still moving along okay: <a href="https://codeberg.org/ziglang/www.ziglang.org/actions/runs/205/jobs/0/attempt/1" rel="nofollow">https://codeberg.org/ziglang/www.ziglang.org/actions/runs/20...</a></p>
]]></description><pubDate>Tue, 14 Apr 2026 07:33:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=47762455</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=47762455</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47762455</guid></item><item><title><![CDATA[Incremental Compilation with LLVM]]></title><description><![CDATA[
<p>Article URL: <a href="https://ziglang.org/devlog/2026/#2026-04-08">https://ziglang.org/devlog/2026/#2026-04-08</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=47683229">https://news.ycombinator.com/item?id=47683229</a></p>
<p>Points: 4</p>
<p># Comments: 0</p>
]]></description><pubDate>Wed, 08 Apr 2026 00:42:08 +0000</pubDate><link>https://ziglang.org/devlog/2026/#2026-04-08</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=47683229</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47683229</guid></item><item><title><![CDATA[New comment by mlugg in "Type resolution redesign, with language changes to taste"]]></title><description><![CDATA[
<p>It is indeed (somewhat) related, and in fact that was fixed by this PR: <a href="https://github.com/ziglang/zig/issues/25771" rel="nofollow">https://github.com/ziglang/zig/issues/25771</a></p>
]]></description><pubDate>Wed, 11 Mar 2026 13:45:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=47335501</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=47335501</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47335501</guid></item><item><title><![CDATA[New comment by mlugg in "Type resolution redesign, with language changes to taste"]]></title><description><![CDATA[
<p>Oh, no problem at all & no shade of any kind intended! I just wanted to clarify this point since it seems like a good few people got that misconception. That doesn't mean you can't discuss breakage anyway, or ask questions of the development / language design process :)</p>
]]></description><pubDate>Wed, 11 Mar 2026 13:37:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=47335421</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=47335421</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47335421</guid></item><item><title><![CDATA[New comment by mlugg in "Type resolution redesign, with language changes to taste"]]></title><description><![CDATA[
<p>Hi, author of this devlog here! Not to dismiss concerns about breaking language changes, but there seems to be a bit of a misconception here that this compiler change was highly breaking and will require significant effort from Zig users to update for. Perhaps I unintentionally gave that impression in the devlog or the PR writeup, apologies if so---but it's not the case! Although there <i>were</i> breaking changes in this patch, they were quite minor: most users are unlikely to hit them, and if they do then they're straightforward to deal with.<p>For a concrete example, while testing this branch, I tried building ZLS (<a href="https://github.com/zigtools/zls/" rel="nofollow">https://github.com/zigtools/zls/</a>). To do that, the only change I had to make was changing `.{}` to `.empty` in a couple of its dependencies (i.e. not even in ZLS itself!). This was needed because I removed some default values from `std.ArrayList` (so the change was in standard library code rather than the language). Those default values had actually already been deprecated (with intent to remove) for around a year, so this wasn't exactly a <i>new</i> change either.<p>As another example, Andrew has updated Awebo (<a href="https://codeberg.org/awebo-chat/awebo" rel="nofollow">https://codeberg.org/awebo-chat/awebo</a>), a text and voice chat application, to the new version of Zig. Across Awebo's <i>entire dependency tree</i> (which includes various packages for graphics, audio, and probably some other stuff), the full set of necessary changes was:<p>* Same as above, change `.{}` to `.empty` in a few places, due to removal of deprecated defaults<p>* Add one extra `comptime` annotation to logic which was constructing an array at comptime<p>* Append `orelse @alignOf(T)` onto an expression to deal with a newly-possible `null` case<p>These are all trivial fixes which Zig developers would be able to do pretty much on autopilot upon seeing the compile errors.<p>So, while there were a handful of small breaking changes, they don't seem to me like a particularly big deal (for a language where some level of breakage is still allowed). The main thing this PR achieved was instead a combination of bugfixes, and enhancements to existing features (particularly incremental compilation).</p>
]]></description><pubDate>Wed, 11 Mar 2026 13:25:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=47335273</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=47335273</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47335273</guid></item><item><title><![CDATA[New comment by mlugg in "Ask YN: What CI do you use instead of GitHub Actions?"]]></title><description><![CDATA[
<p>Zig team member here: we've migrated to Forgejo Actions [0], which is a system built into Forgejo (the Git forge used by Codeberg) which is very similar to GitHub Actions. In fact, while 1-to-1 compatibility is a non-goal, it's <i>almost</i> compatible---many GHA workflows will run with minimal (or no!) changes, and most Actions written for GHA will work fine (e.g. my setup-zig Action [1] worked without changes). I don't necessarily love the design of GitHub Actions, and obviously that's all inherited in Forgejo Actions, but the issues I have with GitHub's <i>implementation</i> are pretty much all solved in Forgejo (plus they're receptive to PRs if you do need to improve something!). Codeberg offer a couple of free hosted runners (x86_64-linux), though they have quite aggressive usage limits (understandably, since Codeberg can't just throw money at free compute for everyone!) so self-hosting is probably kind of necessary for big-ish projects. That's pretty easy though: the runner [2] is trivial to build (including cross-compiling) and run, and is on the whole just a much more solid piece of software, so it's already been very painless compared to what it was like to self-host GitHub's runner. On the whole, Forgejo Actions has really just felt like a much more refined and cared-for version of GitHub Actions; I'm quite happy with it so far.<p>[0]: <a href="https://forgejo.org/docs/latest/user/actions/reference/" rel="nofollow">https://forgejo.org/docs/latest/user/actions/reference/</a>
[1]: <a href="https://codeberg.org/mlugg/setup-zig/" rel="nofollow">https://codeberg.org/mlugg/setup-zig/</a>
[2]: <a href="https://code.forgejo.org/forgejo/runner/" rel="nofollow">https://code.forgejo.org/forgejo/runner/</a></p>
]]></description><pubDate>Mon, 01 Dec 2025 12:00:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=46106350</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=46106350</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46106350</guid></item><item><title><![CDATA[New comment by mlugg in "Migrating the main Zig repository from GitHub to Codeberg"]]></title><description><![CDATA[
<p>I think this thread caused a bit of a hug of death; I too was seeing pretty bad page loads earlier today, but that seems to have sorted itself out. Understandable imo, because Codeberg simply haven't had to deal with this level of traffic so far. I'm optimistic that they'll be able to scale as (thanks to projects like Zig making the switch) their needs grow.</p>
]]></description><pubDate>Thu, 27 Nov 2025 18:41:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=46072038</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=46072038</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46072038</guid></item><item><title><![CDATA[New comment by mlugg in "Migrating the main Zig repository from GitHub to Codeberg"]]></title><description><![CDATA[
<p>GitHub's API has extremely aggressive rate limits which make migrating large numbers of existing issues and PRs off of the platform borderline impossible. AIUI, this is why Gitea's main repo is on GitHub: they couldn't figure out a way to cleanly migrate! The tinfoil hat in me absolutely sees this as an attempt at vendor lock-in on GitHub's end.</p>
]]></description><pubDate>Thu, 27 Nov 2025 15:29:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=46070123</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=46070123</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46070123</guid></item><item><title><![CDATA[New comment by mlugg in "Migrating the main Zig repository from GitHub to Codeberg"]]></title><description><![CDATA[
<p>Forgejo Actions is what Zig has migrated to. It's very similar to GitHub Actions; the downside of that is that you inherit questionable design choices, but the big upside is that migration is super easy. While they don't target 1:1 compatibility, things are similar enough that you basically only need to tweak workflow files very slightly. Our experience so far is that it fixes most of our serious problems with GitHub Actions; in particular, their runner software is significantly easier to deploy and configure, has much better target support (GitHub's runner is essentially impossible to use outside of x86_64/aarch64 linux/windows/macos; we tried to patch it to support riscv64-linux and got stuck on some nonsensical problems on GitHub's side!), and actually accepts contributions & responds to issues. My issues with the GitHub Actions' backend & web interface (of which I have <i>many</i>) are pretty much all gone, too, with no new issues taking their place.</p>
]]></description><pubDate>Thu, 27 Nov 2025 08:17:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=46066985</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=46066985</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46066985</guid></item><item><title><![CDATA[New comment by mlugg in "Migrating the main Zig repository from GitHub to Codeberg"]]></title><description><![CDATA[
<p>This is extremely misleading. "Membership" is about direct contribution to and influence over the non-profit; it'd be somewhat analagous to being a GitHub shareholder. The very first question on Codeberg's FAQ [0] makes this abundantly clear, as does the "Join" page [1]. I don't see any part of the website you could go to to get any other impression.<p>[0]: <a href="https://docs.codeberg.org/getting-started/faq/#what-do-i-need-to-use-codeberg%3F" rel="nofollow">https://docs.codeberg.org/getting-started/faq/#what-do-i-nee...</a><p>[1]: <a href="https://join.codeberg.org/" rel="nofollow">https://join.codeberg.org/</a></p>
]]></description><pubDate>Thu, 27 Nov 2025 03:43:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=46065349</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=46065349</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46065349</guid></item><item><title><![CDATA[New comment by mlugg in "Migrating the main Zig repository from GitHub to Codeberg"]]></title><description><![CDATA[
<p>This was the very first thing I noticed when we (the Zig team) started seriously trialing Codeberg. Honestly, the transition was worth it just for the ability to navigate the website without a 3-5 second wait every time I click a link.</p>
]]></description><pubDate>Thu, 27 Nov 2025 03:20:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=46065206</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=46065206</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46065206</guid></item><item><title><![CDATA[New comment by mlugg in "Migrating the main Zig repository from GitHub to Codeberg"]]></title><description><![CDATA[
<p>> This has been pointed out to them many times, and it's seemingly not something they're willing to fix.<p>On the exact page you're on is a link to an issue [0] acknowledging that the CAPTCHA is inaccessible and expressing that they plan to drop it (albeit with no concrete time-frame). I don't at all understand your argument that Codeberg must be slow at replying to emails (the "manual fallback path") because Wikimedia are; these are two completely unrelated entities and I don't see why you would make inferences about one from the other.<p>[0]: <a href="https://codeberg.org/Codeberg/Community/issues/1797" rel="nofollow">https://codeberg.org/Codeberg/Community/issues/1797</a></p>
]]></description><pubDate>Thu, 27 Nov 2025 03:17:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=46065186</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=46065186</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46065186</guid></item><item><title><![CDATA[New comment by mlugg in "Migrating the main Zig repository from GitHub to Codeberg"]]></title><description><![CDATA[
<p>Yeah, that's actually what we've done on the Zig GitHub repository. However, it doesn't stop pushes to existing PRs, which isn't ideal; and, yes, it's quite hard to escape the conclusion that there being no "until I turn it back on" option is intentional.</p>
]]></description><pubDate>Thu, 27 Nov 2025 03:08:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=46065129</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=46065129</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46065129</guid></item><item><title><![CDATA[New comment by mlugg in "Migrating the main Zig repository from GitHub to Codeberg"]]></title><description><![CDATA[
<p>PRs are not optional: there is no way to disable them on GitHub. I can't be sure that this is intentional, but it certainly works out well for them that this is one of many properties which make it quite difficult to migrate away from the platform.</p>
]]></description><pubDate>Thu, 27 Nov 2025 02:45:55 +0000</pubDate><link>https://news.ycombinator.com/item?id=46064980</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=46064980</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46064980</guid></item><item><title><![CDATA[Actions/runner: safe_sleep.sh rarely hangs indefinitely]]></title><description><![CDATA[
<p>Article URL: <a href="https://github.com/actions/runner/issues/3792">https://github.com/actions/runner/issues/3792</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=44925731">https://news.ycombinator.com/item?id=44925731</a></p>
<p>Points: 5</p>
<p># Comments: 0</p>
]]></description><pubDate>Sat, 16 Aug 2025 18:20:11 +0000</pubDate><link>https://github.com/actions/runner/issues/3792</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=44925731</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44925731</guid></item><item><title><![CDATA[New comment by mlugg in "Zig's New Async I/O"]]></title><description><![CDATA[
<p>> Well, no. In zig that's `const x = foo(io)`.<p>If `foo` needs to do IO, sure. Or, more typically (as I mentioned in a different comment), it's something like `const x = something.foo()`, and `foo` can get its `Io` instance from `something` (in the Zig compiler this would be a `Compilation` or a `Zcu` or a `Sema` or something like that).<p>> Using stackless coroutines and green threads results in a completely different codegen.<p>Sure, but that's abstracted away from you. To be clear, stackless coroutines are the <i>only</i> case where the codegen of callers is affected, which is why they require a language feature. Even if your application uses two `Io` implementations for some reason, one of which is based on stackless coroutines, functions using the API are not duplicated.<p>> I wonder what will happen if you try to await a future created with a green thread IO using a stackless coroutine IO.<p>Mixing futures from any two different `Io` implementations will typically result in Illegal Behavior -- just like passing a pointer allocated with one `Allocator` into the `free` of a different `Allocator` does. This really isn't a problem. Even with allocators, it's pretty rare for people to mess this up, and with allocators you often <i>do</i> have multiple of them available in one place (e.g. a gpa and an arena). In contrast, it will be extraordinarily rare to have more than one `Io` lying around. Even if you do mess it up, the IB will probably just trip a safety check, so it shouldn't take you too long to realise what you've done.</p>
]]></description><pubDate>Sun, 13 Jul 2025 11:44:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=44549599</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=44549599</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44549599</guid></item><item><title><![CDATA[New comment by mlugg in "Zig's New Async I/O"]]></title><description><![CDATA[
<p>Not quite:<p>* Global variables still exist and can be stored to / loaded from by any code<p>* Only convention stops a function from constructing its own `Io`<p>* Only convention stops a function from reaching directly into low-level primitives (e.g. syscalls or libc FFI)<p>However, in practice, we've found that such conventions tend to be fairly well-respected in most Zig code. I anticipate `Io` being no different. So, if you see a function which doesn't take `Io`, you can be pretty confident (particularly if it's in a somewhat reputable codebase!) that it's not interacting with the system (e.g. doing filesystem accesses, opening sockets, sleeping the thread).</p>
]]></description><pubDate>Sun, 13 Jul 2025 11:12:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=44549430</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=44549430</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44549430</guid></item><item><title><![CDATA[New comment by mlugg in "Zig's New Async I/O"]]></title><description><![CDATA[
<p>I mean... you use `await` if you've used `async`. It's your choice whether or not you do; and if you don't want to, your callers and callees can still freely `async` and `await` if they want to. I don't understand the point you're trying to make here.<p>To be clear, where many languages require you to write `const x = await foo()` every time you want to call an async function, in Zig that's just `const x = foo()`. This is a key part of the colorless design; you can't be required to acknowledge that a function is async in order to use it. You'll only use `await` if you first use `async` to explicitly say "I want to run this asynchronously with other code here if possible". If you need the result immediately, that's just a function call. Either way, your caller can make its own choice to call you or other functions as `async`, or not to; as can your callees.</p>
]]></description><pubDate>Sun, 13 Jul 2025 10:48:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=44549306</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=44549306</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44549306</guid></item><item><title><![CDATA[New comment by mlugg in "Zig's New Async I/O"]]></title><description><![CDATA[
<p>Right, the proposal doesn't discuss the implementation details -- I do apologise if that made it seem a little hand-wavey. I opted not to discuss them there, because they're similar-ish to the way we lowered stackless async in its stage1 implementation, and hence not massively interesting to discuss.<p>The idea is that, yes, the compiler will infer whether or not a function is async (in the stackless async sense) based on whether it has any "suspension point", where a suspension point is either:
* Usage of `@asyncSuspend`
* A call to another async function<p>Calls through function pointers (where we typically wouldn't know what we're calling, and hence don't know whether or not it's async!) are handled by a new language feature which has already been accepted; see a comment I left a moment ago [1] for details on that.<p>If the compiler infers a function to be async, it will lower it differently; with each suspension point becoming a boundary where any stack-local state is saved to the async frame, as well as an integer indicating where we are in the function, and we jump to different code to be resumed once it finishes. The details of this depend on specifics of the proposal (which I'm planning to change soon) and sometimes melt my brain a little, so I'll leave them unexplained for now, but can probably elaborate on them in the issue thread at some point.<p>Of course, this analysis of whether a function is async is a little bit awkward, because it is a whole-program analysis; a change in a leaf function in a little file in a random helper module could introduce asynchronocity which propagates all the way up to your `pub fn main`. As such, we'll probably have different strategies for this inference in the compiler depending on the release mode:<p>* In Debug mode, it may be a reasonable strategy to just assume that (almost) all functions are asynchronous (it's safe to lower a synchronous function as asynchronous, just not vice versa). The overhead introduced by the async lowering will probably be fairly minimal in the context of a Debug build, and this will speed up build times by allowing functions to be sent straight to the code generator (like they are today) without having to wait for other functions to be analyzed (and without potentially having to codegen again later if we "guessed wrong").<p>* In Release[Fast,Small,Safe] mode, we might hold back code generation until we know for sure, based on the parts of the call graph we have analyzed, whether or not a function is async. Vtables might be a bit of a problem here, since we don't know for sure that a vtable call is not async until we've finished literally <i>all</i> semantic analysis. Perhaps we'll make a guess about whether such functions are async and re-do codegen later if that guess was wrong. Or, in the worst case... perhaps we'll literally just defer all codegen until semantic analysis completes! After all, it's a release build, so you're going to be waiting a while for optimizations anyway; you won't mind an extra couple of seconds on delayed codegen.<p>[1]: <a href="https://news.ycombinator.com/item?id=44549131">https://news.ycombinator.com/item?id=44549131</a></p>
]]></description><pubDate>Sun, 13 Jul 2025 10:39:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=44549229</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=44549229</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44549229</guid></item><item><title><![CDATA[New comment by mlugg in "Zig's New Async I/O"]]></title><description><![CDATA[
<p>> it depends on <i>reintroducing a special function calling convention</i><p>This is an internal implementation detail rather than a fact which is usually exposed to the user. This is essentially just explaining that the Zig compiler needs to figure out which functions are async and lower them differently.<p>We do have an explicit calling convention, `CallingConvention.async`. This was necessary in the old implementation of async functions in order to make runtime function pointer calls work; the idea was that you would cast your `fn () void` to a `fn () callconv(.async) void`, and then you could call the resulting `*const fn () callconv(.async) void` at runtime with the `@asyncCall` builtin function. This was one of the biggest flaws in the design; you could argue that it introduced a form of coloring, but in practice it just made vtables incredibly undesirable to use, because (since nobody was actually doing the `@asyncCall` machinery in their vtable implementations) they effectively just didn't support async.<p>We're solving this with a new language feature [0]. The idea here is that when you have a virtual function -- for a simple example, let's say `alloc: *const fn (usize) ?[*]u8` -- you instead give it a "restricted function pointer type", e.g. `const AllocFn = @Restricted(*const fn (usize) ?[*]u8);` with `alloc: AllocFn`. The magic bit is that the compiler will track the full set of comptime-known function pointers which are coerced to `AllocFn`, so that it can know the full set of possible `alloc` functions; so, when a call to one is encountered, it knows whether or not the callee is an async function (in the "stackless async" sense). Even if some `alloc` implementations are async and some are not, the compiler can literally lower `vtable.alloc(123)` to `switch (vtable.alloc) { impl1 => impl1(123), impl2 => impl2(123), ... }`; that is, it can look at the pointer, and determine from that whether it needs to dispatch a synchronous or async call.<p>The end goal is that <i>most</i> function pointers in Zig should be used as restricted function pointers. We'll probably keep normal function pointers around, but they ideally won't be used at all often. If normal function pointers are kept, we might keep `CallingConvention.async` around, giving a way to call them as async functions if you <i>really</i> want to; but to be honest, my personal opinion is that we probably <i>shouldn't</i> do that. We end up with the constraint that unrestricted pointers to functions where the compiler has inferred the function as async (in a stackless sense) cannot become runtime-known, as that would lead to the compiler losing track of the calling convention it is using internally. This would be a very rare case provided we adequately encourage restricted function pointers. Hell, perhaps we'd just ban <i>all</i> unrestricted default-callconv function pointers from becoming runtime-known.<p>Note also that stackless coroutines <i>do</i> some with a couple of inherent limitations: in particular, they don't play nicely with FFI (you can't suspend across an FFI boundary; in other words, a function with a well-defined calling convention like the C calling convention is not allowed to be inferred as async). This is a limitation which seems perfectly acceptable, and yet I'm very confident that it will impact significantly <i>more</i> code than the calling convention thing might.<p>TL;DR: depending on where the design ends up, the "calling convention" mentioned is either entirely, or almost entirely, just an implementation detail. Even in the "almost entirely" case, it will be exceptionally rare for anyone to write code which could be affected by it, to the point that I don't think it's a case worth seriously worrying about unless it proves itself to actually be an issue in practice.<p>[0]: <a href="https://github.com/ziglang/zig/issues/23367">https://github.com/ziglang/zig/issues/23367</a></p>
]]></description><pubDate>Sun, 13 Jul 2025 10:23:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=44549131</link><dc:creator>mlugg</dc:creator><comments>https://news.ycombinator.com/item?id=44549131</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44549131</guid></item></channel></rss>