On 3/19/23 06:49, bomat wrote:

> I can live with the `static`
> solution, I guess.

If you could, you would define it 'static' anyway. :) Because you highly likely needed a distinct 'variableWithALongName' member for each MyStruct object, that wouldn't work.

> Shouldn't it be the exact same underlying mechanism?

I don't know the answer. Luckily, what you describe is available in another form in the language:

    ref alias2() {
        return myStruct.memberWithALongName;
    }

Ali

Unrelated: I find 'myObject' a more correct name for a variable because if 'struct' is the definition of a type, 'myStruct' attempts to convey a misleading meaning.

Reply via email to