-
Notifications
You must be signed in to change notification settings - Fork 21
Array Concatenation #18
Comments
Yay! An stdlib function seems reasonable. |
Ah, wait, because strings and arrays are (sort of) the same in the repl, shouldn't |
Just because I know your background: |
OK. Then I didn't just make a new feature branch for this for nothing :) |
I personally prefer option 1 and believe it would be easiest to understand (since .. means concatenate in other parts of the language). I would also like to propose another suggestion:
So |
Yup, and strings are very similar to arrays in many other aspects as well... (maybe I should make the |
For the concat example, it would be trivial to create a loop and just copy the values onto the end of the first array, but there are some opportunities for a concat operator to be built into the language:
..=
The dedicated concat operator for strings could be overloaded to work with arrays, as in:concat()
function built into the STL as in:+=
could be overloaded as in:All of which would need to be mirrored in the implementation with some kind of
spn_array_concat(..);
.The text was updated successfully, but these errors were encountered: