From: Gavin Sinclair Date: 2004-10-01T10:59:30+09:00 Subject: Re: Range syntax theory Zach wrote: > This has been a very fun discussion. I'll shut up now unless anyone > comes up with good reasoning for '..' and '...' or until Matz speaks. I > think everyone knows where I stand. I'll try to come up with a good reasoning. Pretend I'm designing a language. x..y is known to programmers of some other languages as representing a "range" (i.e. not necessarily what we'd call a Range, but something close to the concept). I decide that this concept will have its own representation as a Range object. So: 2..6 # -> Range object So far so good. And familiar to some, but by no means all, programmers of other languages. Now I decide, for the good reasons put forth by others, that end-exlusive ranges are useful enough to be treated explicitly as well. I go hunting for a way to represent them, and settle on 2...6 # -> Range object I find something visually appealing about it, don't agonise over it too much, and there you go -- it's in the language. Speaking as a Ruby programmer again, I personally find nothing whatsoever confusing about the literal range notation, inclusive or exclusive. And I dislike the thought of reversing the notations; not based on precedent and not wanting to change things, but based an aesthetics. And trying to explain why is like trying to explain appreciation for a poem. Cheers, Gavin