RE: Eu's poor design

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

Andreas Rumpf wrote:
> 
> 
> My first language was Pascal/Delphi which has both. (I admit, "pass by 
> reference" (I can learn!) is preferred in Pascal.)
> 
> Apart from that, now another reason (of course for YOU these are only MY 
> 
> shortcomings smile why Euphoria isn't as useful as it could be:
> Have you ever tried to implement a binary tree in Euphoria?

I don't understand your "put" function.  It seems like the only thing it 
will do is try to overwrite new data that is identical to the old data, 
unless I'm missing something.

In any case, the short answer to making trees is to use recursion.  I 
use trees heavily in Euphoria.  The ease of making trees in Euphoria of 
any shape and size is one reason I like Euphoria.  Making almost any 
type of data structure is trivial.  Making non-recursive "flat" trees 
where each node has an explicit index to the next node will gain you a 
bit of speed if your trees are huge with lots of floating-point values.  
That is a little trickier since you need to maintain your own stack to 
build them (making a stack in Eu is easy), and I've done that as well.  
These are not major obstacles.

Strong-typing as pointed out by Irv can be a problem, and the type & 
error system in Euphoria is where the next improvements in the language 
need to be.  But as another in a growing list of "million-liners", I 
have never found myself beating my head against the wall because I 
didn't have pass by reference.  (And I don't care if you don't believe 
me -- doesn't make it untrue.)

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

Search



Quick Links

User menu

Not signed in.

Misc Menu