Re: Discuss changing the behaviour of append()

new topic     » goto parent     » topic index » view thread      » older message » newer message
gimlet said...

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?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu