Re: Discuss changing the behaviour of append()

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

Well - that is interesting,

You pass a sequence to append,
Append checks that it got a sequence.
Double work.

It seems to me that append is entitled to crash if you pass in an atom. That it actually checks before dying...

Leaving aside the convenience of append(1,2) as opposed to {1,2} or 1 & 2.

Isn't it true that if you don't know X is a sequence you shouldn't be appending to it?
Isn't this what types are about?

Isn't this to say that it is up to the caller to ensure that the parameters are of the correct type.

and

It is not up to the called function to validate its parameters.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu