On Friday, 12 September 2025 at 09:55:01 UTC, IchorDev wrote:
On Friday, 12 September 2025 at 08:36:42 UTC, realhet wrote:
Is this a feature or a bug? :D

You will have to start writing much weirder code than this to

Yea, I don't think I dare to do such crazy things, like an lambda in an UDA :D (But now I can't unlearn what I've learned, haha)

I guess it is a feature, a restriction that protects us.

The feature is that the compiler expects the mixin to be this or that, and not parse any type of mixin (statement or expression), and automatically decide what to do with it later.

But in my perspective this is a problem, and the only way I can solve is with more complexity. Basically I will have 2 set of knobs and sliders (any UI components are supported, it's just an example) and I have to choose if I want to use the expression or the statement variant. Or I use more complexity and let the IDE choose the right on when saving the source code text. It can detect the `=` just like the new compiler.

Here's a clip showing the problem: youtu.be/6b_kvZL6qjE


Reply via email to