With pointer-based strings or arrays, as in C , it is natural to start at
index 0, so that you can do pointer arithmetic: address+0 is the first
character/item.
Then, if you have a string or array of length n, the last item is at n-1.

Joshua

On Wed, Mar 4, 2009 at 2:07 PM, Mibu <mibu.cloj...@gmail.com> wrote:

>
> Why does range in Clojure use an inclusive-exclusive range?
>
> I'm aware of the traditional substring range convention, which always
> puzzled me as to how an unintuitive and error-prone use became
> cemented as the norm.
>
> I'm not calling for a change in range. I'm just genuinely curious.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to