Re: Discuss changing the behaviour of append()

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

Can one call append(obj1, obj2) and when obj1 has a sequence assigned to it the function works and when an atom is assigned it fails?

Yes. To further clarify, OpenEuphoria compiles append(1,2) cleanly but fails at run-time.

mindwalker said...

But the question is will this change break someone's program. Could someone have depended on the append function to detect when the first parameter is an atom and to stop the program in that case.

The proposed change cannot break a working program. Theoretically it might make some bugs ever-so-slightly harder to detect, however when appending a sequence it is no help whatsoever, which means it isn't a sensible thing to rely on to help debug programs anyway, at least for the "got yer arguments back-to-front" problems.

Pete

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

Search



Quick Links

User menu

Not signed in.

Misc Menu