RE: Eu 2.5: new sequence functions

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

> 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...

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

Search



Quick Links

User menu

Not signed in.

Misc Menu