1. RE: append() tip
- Posted by Chris Bensler <bensler at mail.com> May 31, 2002
- 421 views
I'd like to hear Rob reply on this. x = append(x,y) <-- does eu type check x for a sequence in both instances? x &= y <-- only once? Besides preference, should there be any difference between the two forms? Chris dm31 at uow.edu.au wrote: > |I find three issues to consider: > |1) Both append(a, b) and prepend(a, b) need that 'a' be a sequence, > not an > |atom. > |2) At least for the cases presented in this message, both append() > and > |prepend() are faster. > |3) It is by no means clear why append() and prepend() should be more > |difficult to understand and apply than their counterparts, as it > seems to be > |implied in this thread. > |I am not taking side for someone in this controversy, only stating > what I > |think are facts. > > 1) Fair enough, but if you program correctly, it shouldn't be a > problem. > > 2) I didn't test for these cases, but used a larger data set. > Maybe they where optimised more in 2.3, because I did the times ages > ago... > > 3)Speaking for myself only, I don't find it any harder to understand, > I just thought it was faster... Guess I better check the times again > in 2.3 > > Regards, > Dan > > >
2. RE: append() tip
- Posted by a.tammer at hetnet.nl May 31, 2002
- 434 views
Could we end this thread, by stating that if a were an atom,= integer or for what that would ever be in Euphoria a COCONUT, from the moment I put [a], I SEQENCISED it, IE I for the purpose= of using it in Euphoria, though a WILL STAY an atom, {COCONUT} or {A} IS A SEQUENCE. Thanks for all input , and exchanged opinions on this item guys antoine