No idea what the name is for these, so sorry for the bad title...
@kiljacken suggested this on IRC and I'm pretty certain we all agreed on this feature, so here goes at "documenting it".
Basically it's a scope that does something and will yield a result, supposedly this is useful for things like RAII, the syntax looks something like this:
x := {
...
yield baz;
};
// x is now baz
I'm wondering what the type is for this thing because here we infer the type, I'm gonna take a hit in the dark and assume we infer it based on the value that the scope yields?
No idea what the name is for these, so sorry for the bad title... @kiljacken suggested this on IRC and I'm pretty certain we all agreed on this feature, so here goes at "documenting it".
Basically it's a scope that does something and will yield a result, supposedly this is useful for things like RAII, the syntax looks something like this:
I'm wondering what the type is for this thing because here we infer the type, I'm gonna take a hit in the dark and assume we infer it based on the value that the scope yields?