David Arno
David Arno
Putting a checklist here to keep track of adding this to the new v4: - [x] Use the names `CaseOf()`, `TryCaseOf()` and `HasCaseOf` to better fit with other such methods....
Need to add details of these methods to the wiki now that v4 is released.
@CyrusNajmabadi, > That's because this is a deconstruction, and you need a type on the right to try to find the appropriate .Deconstruct method. There are no `Deconstruct` methods for...
@Neme12, > I just don't see the use case for this. You don't want to create a tuple here (otherwise you would use one) and you don't need to deconstruct...
@jaredpar, > This proposal essentially adds shallow immutability to class types. That is a readonly class cannot be directly mutated after construction but is not deeply immutable because it can...
@scottdorman, ````cs using System; namespace Company; using System.Collections; namespace Project { public class Product { } } ```` wouldn't (or at least, shouldn't) be allowed under this proposal. By having...
@alrz, Not sure if I'm misunderstanding your example, but if `e` is a class instance, then surely your wither will modify the original instance, rather than creating a modified copy?
@alrz, I'd see update blocks as unrelated to this. Having a with expression modify the original data would be really bad in my view.
~~Is there a reason why `never` would be needed here, rather than just using `void` (and thus, potentially allowing any statement to be treated as a void-returning expression, not just...
@MI3Guy, I'm clearly missing something over your use of `never` in generics as the following can be done already: ```cs public sealed class ResultError : IResult { public string ErrorMessage...