Re: ? 1={}, is there really any other interpretation?

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

CChris wrote:
> But... but....
> Euphoria doesn't have a native string type,

Didn't say it did. 

> hence 'name > "Pete"' CANNOT be an atom in a consistent way. 

I disagree with the implied imperative in your use of 'hence'. You see, it all
depends on what one means by the symbol '>'? To me, that symbol means 'compare
the left and right operands with each other to determine which of them has the
greater value'. I agree that when Euphoria current applies this symbol to
operands, when at least one of them is a sequence, the symbol means 'compare each
respective element, recursively, to form a new sequence that has the results of
each atomic comparision'.

My point is that when humans see '>' they tend to think 'is A bigger than B'
rather than 'give me something that shows if each part of A is bigger than B'


> "strings" are arrays, and a relational op between arrays is supposed to
> return an array imho. 

So when somebody asks you does "Harris" come before or after "Harmon", you reply
with {1,1,1,0,1,0}?

> Hence, even if it is not ideal, the current way of doing things
> is probably the less problematic.

"less problematic" than what? Than doing it they way most people tend to think?

> When Euphoria is able to store strings as 1 or 2 bytes a character,
> which is how every OS stores and passes strings, and has operators
> to act upon these new objects almost as if they were atoms, then
> you may have a point.

I have a point now, actually. To make it easier for humans to create programs is
why we have programming languages, therefore the languages should help humans do
their job. Keeping poorer aspects of a language in place needs to be justified,
as does changing them. We need to examine, empirically, the true cost of making
Euphoria better.

Andy Serpa seems to be stating that 60% of all his expressions that involve the
comparision operators are actually sequence operations. I'd like to see further
analysis of other people's code before deciding if its worth attempting to
improve Euphoria in this aspect.

> And many programs will become easier both to read and write
> - let's not forget this last part.

I assume you mean easier when Euphoria treats comparision operators as
operations that compare the operands as if they were entities in their own right
as opposed to recursive lists of atomic entities. Yes, that would be easier to
read an write than the current situation.

-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

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

Search



Quick Links

User menu

Not signed in.

Misc Menu