Hi Vitali,
At present the compiler does not support referencing a member of a
constant, nor computing basic arithmetic, etc. I think it would be cool to
add support for these things to the language, but personally I haven't yet
had a need for it.
-Kenton
On Fri, Oct 4, 2019 at 7:24 PM wrote:
>
I was wondering if it's possible to derive one constant from another?
Something like:
struct Foo {
a @0 :Float32;
b @1 :Float32;
};
const oneWay :Foo = ( a = 1.0, b = 2.0 )
const orAnother :Foo = ( a = .oneWay.b, b = .oneWay.a )
And of course expanding this wondering if basic math operation