Open dark-valkyrix opened 1 year ago
Close as duplicate of https://github.com/fsharp/fslang-suggestions/issues/1011
I believe the intention is that all three boxes below the headline "Affidavit" is checked before an issue is submitted. As it says in the Code tab: Just use GitHub search over the issues in this repository. It can still happen that we get a duplicate, but then we've at least made the effort intended to decrease the number of issues.
Close as duplicate of #1011
Sorry, it might look similar to you, it does not to me. This has nothing to do with classes. I understood such complexity might have led the answer to be a "no".
I suggest the opposite then, for more consistency, how about we forbid ?
let (a, b, c) = (1, 2, 3)
That way, we don't ask for :
let mutable (a, b, c) <- (1, 2, 3)
@dark-valkyrix These really are the same suggestion at the core. I doubt that Don rejected it because of the usage of a class in the example; I think he doesn't want the idea itself. I do understand the desire for such symmetry (and I personally wouldn't think it would be so terrible), but it's already been decided.
Disallowing tuple patterns from regular let-bindings would not be in any way feasible, as that would be an unbelievably breaking change.
I propose we allow multiple mutable assignments when deconstructing tuples :
is currently not allowed.
The existing way of approaching this problem in F# is by using single mutable assignments :
Pros and Cons
The advantages of making this adjustment to F# are more concise code.
The disadvantages of making this adjustment to F# are abusing of mutable variables.
Extra information
Estimated cost (XS, S, M, L, XL, XXL): should be S
Related suggestions: (put links to related suggestions here)
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply:
For Readers
If you would like to see this issue implemented, please click the :+1: emoji on this issue. These counts are used to generally order the suggestions by engagement.