Re: question on func equal_from

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

jacques deschênes wrote:
> 
> 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

Sorry, I feel very strongly about this. Euphoria is NOT an OOP language, and
should NEVER become so at its core. Using the add on libraries is fine for those
that wish to do so, otherwise get off 'my' procedurals. There are many other
simpler
clearer ways of resorting to solutions rather than resorting to overly complex
and
needlessly obscure object orientated techniques - this is not the spirit of
Euphoria.


> 2) adding error handling support

Do we not already have that? Admittedly it may not be the catch all that other
languages have, but does it not serve its purpose? Is it not flexible enough
to adapt with a little ingenuity on the part of the programmer?

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

Again, sorry, I have to disagree. Its not easy to learn, and it adds a totally
unnecessary
level of complexity to any programming task. All of the arguments in favour of
oop can be equally dismissed by any procedural technique. If you want to use
objects
use an OOP language (C++, C#, Delphi, Visual Basic etc etc - Euphoria is not
trying to compete with these - is it?)

Regards

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