Replies: 6 comments
-
I'm not sure I quite understand why we need the first part (
In the current way, with |
Beta Was this translation helpful? Give feedback.
-
Yes you are right, we don't really need to drop the left-hand |
Beta Was this translation helpful? Give feedback.
-
If you ignore how it's actually implemented, my feeling was that:
feels better than
But of course this is all open for discussion... |
Beta Was this translation helpful? Give feedback.
-
I agree with David that it would make sense to keep the Z on the left, it seems that we would have less edge-cases by always including the Z. It would be nice to keep this mainly a frontend-feature, without making the internals more complex. We should still be able to shift the Z when adding a new dimension on the left with |
Beta Was this translation helpful? Give feedback.
-
The proposed way definitely looks cleaner, I suppose it's more of a tradeoff between this cleanness and some internal complexity. To avoid changing the internals, you could, I think, even make a constructor like That said, looking at this again, the 'complexity' of the internals really shouldn't be that high with this new approach. The more I look at it, the more I'm in favour. |
Beta Was this translation helpful? Give feedback.
-
Yes I don't think the representation types would need to change, this is just a front-end feature. |
Beta Was this translation helpful? Give feedback.
-
Here's something that I have been playing with recently. The details & consequences are not fully fleshed out, but I include a small sample implementation to give the flavour. The core is to change the type of array indexes to:
so that for
DIM2
and higher, they are open at both the left and the right. We then have (pattern synonyms)(:>)
and(:<)
to add/remove an index on the right (as we have now) as well as the left, respectively. There are a few examples at the bottom of the attached.Comments/suggestions/criticisms welcome!
Example implementation
Beta Was this translation helpful? Give feedback.
All reactions