RE: Eu's poor design

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

> (making a stack in Eu is easy)
Let's see the stack in Eu:

sequence stack
stack = {}

function push(sequence stack, object item)
  return stack = append(stack, item)
end function

function pop(sequence stack) -- returns stack without top
  return stack[1..length(stack)-1]
end function

function topOfStack(sequence stack)
  return stack[length(stack)]
end function

Yes, quite easy. But what if I want to make it easier and more 
efficient? (Using push()/pop() that modify the stack directly!) Guess 
what, it can't be done in Eu.
Again, in Pascal/C/etc. I have choice how to implement certain things!
You can't even write a swap() routine, because of lack of pbr!

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

Search



Quick Links

User menu

Not signed in.

Misc Menu