IS4
IS4
@brianrourkeboll I do mention the case when the property already returns a `byref` value as something that should not be changed (and I consider mutable record fields the same situation);...
@brianrourkeboll That is true; the only language I know that can do this is VB.NET. I meant this more as a follow-up to #867 ‒ if there is resistance to...
@T-Gro I don't have experience with Lens so I am not the best to provide equivalent code, but it seems it does a very similar thing, just with some boilerplate,...
I would rather prefer having a general way that automatically covers enum cases too, i.e. `const Name` instead of, say, `enum Name`. That being said, there are other options too...
@voronoipotato I felt the same way, but it does not seem to be the case. The spec has separate grammar rules for patterns which do not cover arbitrary expressions, even...
@T-Gro It is true that mutation does not fit F# programming, but this is about correctness. In situations where you have a type like `ArraySegment`, or anything else that represents...
And there are existing APIs where structs are not used even though they could. One is even in the [docs](https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/members/indexed-properties#indexed-properties-with-multiple-index-values): ```fs open System.Collections.Generic /// Basic implementation of a sparse matrix...
Also linking to the original C# discussion that made the above code work, and the follow-up: dotnet/csharplang#2068 dotnet/roslyn#45284 I think similar patterns apply in F# as well, and would work...
@voronoipotato Sorry ‒ the change is just adding `[]`, i.e: ```fs open System [] type ListSpan, start: int, length: int) = member this.Item with get (index) = list[if index >=...
I was just going to propose the exact same thing. I support this wholeheartedly ‒ the fact that the following code has completely different interpretation depending on which of the...