RE: Eu 2.5: new sequence functions
- Posted by Andy Serpa <ac at onehorseshy.com> Jan 13, 2004
- 383 views
> Thanks for telling me, I didn't know. But still, these functions are > very common, don't you think? > > And readability of code is very important: I think that 's = replace(s, > i, o)' is more readable than 's = s[1..i-1] & o & s[i+1..length(s)]'. > > And even without the boundary check: these functions as builtin > system-functions would be a lot faster than the Euphoria-equivalent. And > > more optimizations could be done: I think I read that A=append(A,B) is > optimized to be faster than A=append(B,C), so A=insert(A,I,O) could also > > be optimized to be faster than A=insert(B,I,O). > > And I don't think that they are very complex to implement as builtin > functions, right Robert? ;-D Yes, yes, very common functions. It could be that Rob has already optimized statements like: s = s[1..i-1] & s[i+1..length(s)] If not, they'd certainly be excellent candidates for built-ins, yes...