David Arno
David Arno
@IllidanS4, Just an example of how `readonly` on structs can be bypassed: ```cs readonly struct Struct { readonly StorageClass storage; public int Property { get { return storage.Property; } set...
@TonyValenti, > I really dislike the `3;` part Which goes to prove the "you can't please all of the people..." adage. That form, `{ Foo(); 3 }` is exactly the...
Not sure how the scoping of variables declared within an expression block would work, but supporting the following scenario seems a key requirement of this feature as it's one of...
@Danthekilla, You forgot the existing third way: ```cs (bool found, ValueType value) Foo() { for (int x = 0; x < xMax; x++) { for (int y = 0; y...
@jnm2, ```cs (bool found, ValueType value) TryFindValueIn2DStructure(... ``` I've never really been convinced by the "naming is hard" argument. If you understand what a piece of code does, you can...
> Orthogonal concerns... Sometimes it's good to pause and think through what someone says before instantly rejecting what they are saying. When we do so, we see that the true...
> So then how do you propose to make a set accessor also mandatory? As explained above, by using `init set`. > `init` doesn't mean mandatory. It means you can...
Just to check, since I get confused between statement expressions and expression statements, will the following syntax by valid with this proposal: ```cs void M(bool c, ref int x, ref...
@Thaina, It seems sensible that it'll give you a `error CS0815: Cannot assign void to an implicitly-typed variable`
@Thaina, The value of, `c switch { true => x = 1, false => s = null };`, isn't `?int` though; it's `void`. Just as I can write, ```cs void...