4 ms·
The fundamental reason why many functional languages won't allow you to do the first is that they use immutable data structures. We could indeed introduce synt
by Polygator 3y ago
The fundamental reason why many functional languages won't allow you to do the first is that they use immutable data structures.
We could indeed introduce syntactic sugar (`y= (x[0]:=10)` maybe), but you'll still need to introduce a new variable to hold the modified list.
- thrdbndndn 3y agoIt's my understanding that, at least in Python, you can't change immutable data type but you can just assign a new data to the same variable and therefore overwrite it, right? So even if JAX makes list type immutable, you can still just re-use `x` to save the new modified list.
- deleted 3y ago[deleted]