1. I like compare

Im the type of person that is not good at languages (read: human languages).
Im don't have what you call a photographic memory, im incapable of learning
'data' thats too much alike.

Why is it possible for me to easily learn a programming language ? Because
it is consistent.

The day Euphoria would allow:

if {1,2,3} > -1 then

.. some code ..

end if

Is the day, I will never ever touch that sick twisted version of Euphoria
again.

Some people remember everything, and easily work with exceptions. Some
people dont even notice consistency or are capable of real perception at
all. They only know what they hear, while you can know so much more by just
applying and combining what you know.

You dont have to remeber, that an if-statement needs a compare statement to
check if two sequences are equal, etc. It should be the most logicial
considering both the nature of the two datatypes, the fact that an
expression like {1,2,3} > -1 doesnt make any sence, returning a single value
and also considering the way *expressions* are formed.

Considering the new-short circuit, although needed (I admit), the fact that
expressions word differently, adds about a zillion lines of documentation.
It is indeed an *exception*, and exceptions, practical twists, etc ruin the
simplicity of any language.

Euphoria is and should remain to be a programming language, where the
grammatical rules should be simple and consistent. If we would want it to
act upon context, we need a really good and clear system to do so, not just
'hack'-it into the interpreter. It is not a human language. People, accept
it. If you want throughout context sensitive interpretation, take a look at
the more recent versions of Visual Basic, where you can say things like:

for index = 1 to "4" + name
    print name + "4"
    print index + name
end for

Name is a string, containing a valid number.
It will loop upto 4 + the value of the "name". In every loop it will display
the value of the name with "4" appended to it. Then it will display the
result of the mathimatical calculation of the index counter plus the value
inside the name.

Most wars, problems, arguments are started because of bad interpretation, a
communication problem. The last place you want to have such dillema's is
inside a computer. Dont mess with logic. Keep it simple and consistent. If
some one doesnt get it at once, they're logic is wrong, not the logic of the
language they're programming in.

Leave it alone. And preferble find a more elegant solution to
short-cirquiting, maybe alternative operators, that will work the same
(short-circuit) in an expression as in an expression used in an if
statement. This is and should be the same:

a = x or y
if a then
-----------------[ should be the same as ]
if x or y then

But in the future isnt.. is *that* logic.. or just plain hacky ?
I dont call it a solution, you're just putting the problem out of the way,
you're currently taking.

Ralf

new topic     » topic index » view message » categorize

2. Re: I like compare

Next time I start this rant again, just remind me to type:

   ? "foo" = "bar"

I have to admit, I have once again forgotten that Euphoria thinks of it as:

   { 'f'='b', 'o'='a', 'o'='r' }

because I almost never use that feature.

*heavy sigh*

But I *still* despise the 'compare'.

Robert: why didn't you just write a mapcar function? You know:

   ? mapcar( >, "foo", "bar" )

Oh, well. It's a bit late in the design stage now. sad

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu