Re: question on func equal_from

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

I'm not found of pushing everything in the core interpreter, it will become
overwheighted and more difficult to maintain.
A this time I would rather see:
1) adding object support
2) adding error handling support

As those 2 are parts of most used modern language.
Some are afraid of oop but it's really easy to catch.

jacques Deschênes


Salix wrote:
> 
> jacques deschênes wrote:
> > 
> > 
> > equal_from() seem pointless to me as one can do, as you mention in your own
> > message:
> > }}}
<eucode>
> > r = match(x,s)=i -- no exertal perenthesis needed
> > </eucode>
{{{

> > 
> > regards,
> > jacques deschênes
> > 
> 
> I do not think so.
> 
> Let's assume i=1000000. It means that x starts at position 1000000 in 
> sequence s. The match routine needs to go through the first 999999 
> elements of s to be able to return a result. (The result is 1000000.)
> 
> It is obviously a lot more time than jumping to position 1000000 and 
> to see if x is there. (But to jump there you would need to make sure 
> a few things including that 1000000<=length(s) and 1000000>=1.)
> 
> I haven't included a test code here but give a try. 
> 
> So, my question remains. Why don't we have equal_from if speed 
> was such an important issue in case of find_from and match_from?
> 
> Cheers, 
> 
> Salix
> 
> P.S.: Even match_from doesn't replace equal_from because length(s) 
> can be easily 999999999 or something like that.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu