Re: Discuss changing the behaviour of append()
- Posted by DerekParnell (admin) Jun 08, 2014
- 5202 views
Isn't it true that if you don't know X is a sequence you shouldn't be appending to it?
The situation that I needed it was when I was working with elements of a sequence. In other words, I was working with objects and I don't know if they are sequences or atoms unless I specifically check for it.
Ok, let's change the approach. If Euphoria didn't have an append function, and one was being proposed, why would the first parameter necessarily have to be a sequence? In terms of functionality, the difference between append and concatenate, is that append joins the second parameter as ONE object to the first parameter, and concatenate joins the second parameter as a set of zero or more objects to the first parameter. Why must append have a sequence as the first parameter and concatenate doesn't?

