Re: Discuss changing the behaviour of append()
- Posted by jimcbrown (admin) Jun 08, 2014
- 4524 views
Every use of the function takes an (admittedly small) hit to allow an atom to be passed as if it were a sequence. There are probably more than a few functions which could benefit from this and a few more which could benefit from allowing sequences to be passed as atoms.
If it is the case the translator doesn't check then it would make sense not to change append's behaviour.
Why? If it's for performance reasons then I'd disagree - usability comes first.
Append is surely used > 99.9% in situations where a sequence is passed as parameter.
Right now it's 100% (not including errors).
To account for the < 0.1% of cases where an atom is passed by changing the function does not make sense.
Sure it does! At least, I think there had better be a good reason if we're going to exclude a minority.
Probably a lot of these implicit conversions are stupid or unsafe.
I don't follow.
In the long run it's your language and you can do with it as you like.
Well, not mine personally. It's a community and a group decision. But, well, yeah...