opendlang / opend

Boost Software License 1.0
84 stars 18 forks source link

Implement variables as expressions #19

Closed ghost closed 8 months ago

ghost commented 8 months ago

We have

if (const a = get ()){}

also

while (const a = get ()){}

It's time to recognize that this is an expression.

if ((const a = get()) && a.b) {}

Semantics are bit tricky tho, because of scopes, but proven to work. Really worth.