Re: New switch/case idea

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...
kinz said...

In standard Euphoria, the word "do" does imply namely the looping or cyclic actions, it is used only in cyclic constructs and nowhere else.

for i=1 to n by 2 do 
     ....... 
end for 
 
while a do 
     ....... 
end while 

No, the "do" notes the start of the basic block of code. The "for" or the "while" are where the looping semantics come from. "do" is the euphoria equivalent to a curly brace in C-like languages. So is 'then' when looking at an if statement.

Matt, in BASIC language, there is DO...LOOP cyclic construct. And real semantic of this construct is not "looping" but cycling. So DO means start of cycle - and means strongly. It is old good tradition of BASIC world. Yours "do", which is equivalent to a curly brace in C-like languages, looks just as nonsense. English "loop" in program texts smells as jargon and never was translated as "petlja" in Russian computer literature. It is cycle here, in Russia.

mattlewis said...
kinz said...

So I'm free to translate it in its own sense - as marker of cyclic block. In Russian it sounds as cycl.

You can translate it however you like, but that won't change its intended meaning.

My translaion is not my whim or caprice, it is just real meaning of situation. And you'd think about "its intended meaning" once more.

mattlewis said...
kinz said...
DerekParnell said...

It is used as a marker to begin the block of code that is being control by the previous statement. If that previous statement is a looping construct then "do" marks the begining of a loop,

So, what is wrong if the name of the marker of begining of the cyclic actions is cycl, as it is in bilingual EU 2.5 in Russian mode???

You've put extra meaning into that keyword that was never there. It becomes really apparent now that the usage of 'do' has expanded.

Why do you say "that was never there"? You'd look up to BASIC, Euphoria is simpler than BASIC. BASIC has these "do", good BASIC's "do", but expanded usage of 'do' in Euphoria 4.0 looks ill-treated.

mattlewis said...
kinz said...
DerekParnell said...

if the previous statement is not a looping construct, the "do" marks the begining of a non-looping block. Actually to be very consistent we should be using the syntax ...

if condition do 
  block 
end if 

Wait a minute ... Where did you see if condition do?
The standard Euphoria doesn't have that, it has then marker here, to in Russian mode. And it is very good. In C we have { for all at all markers of begining.

You misread what he said. He said that to be perfectly consistent, we'd have if-do blocks instead of if-then blocks. I think the usage of 'then' is largely historical, from BASIC dialects, and is pretty widely understood.

Do not explain me "what he said", please. I just can not believe that if-do is his own invention for future Euphoria, and reask him.
Then, as I can see, you do remember BASIC dialects but just forgot about BASIC's "DO".
I'm sure that BASIC's "DO" is pretty widely understood too, same as 'then', so let's not confuse BASIC's users with unnecessary, "expanded" so to say, "do" of Euphoria 4.0.

mattlewis said...
kinz said...

Is "cycle" still confusing someone?

It will perhaps confuse your Russian users, now that 'do' is used for things other than loops.

I think that yours 'do', used for things other than loops, will confuse all people wanted migrate from BASIC to Euphoria 4.0 - much more than Russians only.

mattlewis said...

While others have expressed some opinions regarding alternate ways to mark the start of the block, I don't think that anyone else has mistaken the meaning of 'do' the way that you have.

I do not think that some new markers are necessary in future Euphoria at all.
If you need new marker, it is a good signal to rethink your solution.
And 'do' as a marker is too bad - it has enormous amount of meanings in English, see please yours post about Dictionary on this subject.
BTW that Dictionary dosn't have one important entry - in BASIC, DO means start of cyclic construct. smile

Regards,
Igor Kachan
kinz@peterlink.ru

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

Search



Quick Links

User menu

Not signed in.

Misc Menu