1. Oops. It wasnt a joke.
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL>
Sep 10, 1998
-
Last edited Sep 11, 1998
First of all, I really really thought Jiri was kidding, not because I found
his critics to be so dumb, but because they were countering about 9 out of
10 ideals Euphoria stands for.
Jiri, obivously likes Euphoria for different reasons than what Euphoria
advertises with. And he has a point. You're helping the compiler.
However, it is an compromise.
You have control-freaks oriented languages .. " I need to know preciously
what the proccesor is doing with what memory, etc. "
And you have algorithm oriented languages .. " I need the most easy way to
express my algoritmic thoughs, without having to consider the way the
computer handles it"
However, any language, any grammer, unless you can specify your own,
restricts the algorithmic freedom and forces you to either think in a
certain language or translate your thoughts to the language.
Considering this, and consider the goal of programming as practised by the
profession section: it has to be practicle: readability and speed are
MUST-have's. Portability can be crucial at times as well.
So, at certain points we *need* to direct the proccesor, and help out the
compiler a bit.
Consider this kind of code, just to get ex.exe to optimize it more:
-- no declaration:
function myfunc (pizza, people)
if sequence (pizza) then
return FALSE
end if
pizza = pizza + 1023
people = people + 0.3 -- People is atom
return pizza + people
end function
instead of:
function myfunc (integer pizza, atom people)
return pizza + people + 1023 + 0.3
end function
Cuz:
function myfunc (pizza, people)
return pizza + people + 1023 + 0.3
end function
which would consider pizza to be of atom or maybe even sequence as well,
which is slower.. to optimize this (in your new fantasy Eu) would look like
the *longer* one on top.
Admit it.. we'll optimize in more than half the cases, and if we really dont
want to care about it, we dont have to.
It is a freedom we have now, but in your new Eu is lacking. You are forced
to fool, and predict the behaviour if you need your code to be a little bit
faster. Which is worse ? Honestly ? Hence the word compromise.
Ralf