Re: foreach

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...
CChris said...
foreach s[index] do 
-- whatever 
end foreach --<-- when do we get rid of that redundancy? 

The redundancy is only in the eyes of the interpreter. It doesn't need it. But the end XXX serves another purpose. Source code is actually meant for people to read, not programs to read, and people are not as efficient at symbol processing, so we need a certain amount of redundancy to help us understand what we are reading.

It doesn't need it, but it uses it to make sure that it understands what we're trying to tell it. Much easier than C or Java, where you have to track back to figure out where you missed or added a curly bracket.

Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu