Re:Ruby adds experimental support for Rightward assignments
by satisfaction on Saturday September 05, 2020 @12:50PM
(#24384958)
I think it would be possible to think of this in terms of complexity theory, for N case statements to you would possibly have to check 2N locations for assignment. I wonder if you could do parallel assignment: var1 = case = var2
Not necessarily more complex, but not less complex either IMO. I often say complexity can’t be eliminated, only spread around differently; I think we’re seeing that here.