Open glaebhoerl opened 9 years ago
There's perhaps some relation to the splicing proposed for variadic generics.
Triage: @glaebhoerl any thoughts on taking this to the "next level"?
Thanks for triaging! I don't think I'll have the bandwidth (or, to be totally honest, the desire) to work on RFCs any time in the near future.
@glaebhoerl can you elaborate re. "desire"? is that specific to this feature?
Nah I just don't have stamina/motivation for the RFC process.
Ah ok; sad to hear that particularly since you always make great contributions.
Analogously with functional struct updates, we could also allow "functional array updates", or in other words splicing of fixed-length arrays:
Here
b: [int, ..9]
. Unlike FSU, there can be any number of array splices in any positions.This has some syntactic overlap with replication:
but even the latter case can always be disambiguated based on the type of
x
(it's either an integer or an array; it can't be both).(Also, we may want postfix rather than prefix
..
in this case, removing the overlap completely. But we should also want that for FSU.)