Re: mainly syntax
- Posted by "BABOR, JIRI" <J.Babor at GNS.CRI.NZ> Feb 18, 1998
- 750 views
I agree with just about everything David Cunny just wrote! [END OF SLICE] > foo = bar[n..end] is possibly more readable than foo = bar[n..-1], but -1 is somehow more appealing to my warped mind. (I must have a look at your PP again, David!) Btw, what are the origins of this "foo" thing in computing? Am I missing something here, because English is not my first language? [Dots] >Now, here's some irony. First, Jiri suggests that the ABC/Python syntax is >too radical: > if x then > for i = 1 to x do > do_something() > >and suggests writing: > >> if x then >> for i = 1 to x do >> do_something().. > >The end result is, although they are functionally different (Python pays >attention to indentation, etc., etc.), they *look* exactly the same: only >your example seems to have added the kind of syntactic verbiage you were >trying to avoid in the first place. Not so much irony, just a bit of an old fashioned compromise. I want the brevity, but do not wish to impose any layout restrictions. Basically, I want to keep the indentation style for my own purposes... [The Tyranny of Compare] Again, I agree, it should be compiler's job to sort out all possible meanings of "=". [Zero Indexing] If you are a non-Mayan, it is perhaps initially a bit more natural to start counting from one, but it becomes quite tedious quite quickly to be force to add and subtract ones all the time. At least, the language should give you a choice. Jiri