[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pkl: Disallow labels in unions
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] pkl: Disallow labels in unions |
Date: |
Wed, 19 Jan 2022 17:22:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hi Mohammad.
> -Note that, unlike structs, unions cannot be pinned.
> +Note that, unlike structs, unions cannot be pinned. And, like pinned
> +structs, they cannot have labels.
That's a very confusing phrasing.
What about something like this:
---
It makes little sense to mark union types as pinned, since whatever
alternative is chosen will always be located at the beginning of the
union. To avoid unneccesary confusion, the Poke compiler will emit an
error if you try to tag an union as pinned.
Similarly, labels are not allowed in union alternatives.
---
Other than that the patch is OK for master.
Thanks.