1. Re: mainly syntax; to Robert

many people wrote:
> x [1..length(x)]

By popular demand, I will reconsider this,
but sometime after 2.0 final (March).

Lee woo seob writes:
> How do you think about introducing ^ operator
> which stands for power()

I don't think power() is used that much.
I didn't want to introduce too many special
symbols into the language. I thought that would
make Euphoria easier to learn. There's a special character
for concatenation (&) which works well because
you often have code like:
      a = b & c & d & e
but the other special characters in Euphoria are
just the standard ones,
for arithmetic, relational operators etc.

If I make a special character for something then
I have to define in the parser what precedence
that operator has, and you need to remember
the precedence. C has lots of special characters
and *15* different levels of precedence, some of them
surprising. After years of programming in C
I still occasionally say things like:
       if (a & 0x00FF == c)
forgetting that this really means:
       if (a & (0x00FF == c))
*NOT*:
       if ((a & 0x00FF) == c)
as I intended.

Usually after a few hours of debugging I find my mistake.

"&" is "bitwise and" in C
== compares for equality

Conclusion: I'd like to stick with power().

Regards,
     Rob Craig
     Rapid Deployment Software

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu