Joseph Musser
Joseph Musser
Just to be clear: special-casing is what we are asking for. Just like `(var x, var y)` and the `var (x, y)` special case.
I wanted to use it to satisfy assignment rules for certain code paths. I think there were three out variables in one parsing scenario, and early returns became very painful.
I've switched my position on https://github.com/dotnet/csharplang/issues/1064 (disallowing `_` as an identifier) from downvote to upvote. Sure, it would break the past years of my code in which I used to...
@AustinBryan It's Roslyn terminology for the syntax container. In a C# project, each file is a compilation unit. C# scripting is different.
@JoergWMittag That would be ‘compilation.’
To add to the motivation (I've wanted `readonly class` since before `readonly struct` was shipped): Having it built in makes it more widespread. Where it shines is when you see...
@joshfisk It seems like it would not be ideal for the keyword to differ in meaning between classes and structs, so we should be able to already know the semantics...
@isaacabraham I have a couple instances of trees of immutable state that have references to mutable classes (treated opaquely) by necessity, deep in the tree. I would not be able...
> I still feel like adding a keyword to the type should change the way the type works, perhaps instead of adding error messages, and making you add readonly to...
It was opting *out* of being async that I was expecting to see listed under the motivations. ```cs async Task FooAsync() { var bar = await BarAsync(); (() => {...