From: Tom Werner Date: 2007-07-17T04:05:11+09:00 Subject: Re: The Pebble in the Ruby Shoe matt neuburg wrote: > Raphael Gillett wrote: > > >> The pebble in the Ruby shoe is the counter-intuitive use of indexing of >> elements of arrays, strings, etc., from 0 to n-1 instead of the more >> natural 1 to n >> > > But since Ruby lets you reach right in and override everything, couldn't > you just change this in your own programs if you don't like it? > > m. > This seems like a terrible idea. Part of learning a language is learning the ways that things are done in that language. If a coder starts rewriting basic methods because of some silly prejudice against zero-based indices, then that coder has just introduced a huge potential trap for anyone wanting to modify that code. Some seriously nasty bugs would almost certainly be introduced until the contributor realizes that their basic assumptions about the language have been changed. Rewriting functionality at that level should always be done with a very careful analysis of how those changes might impact other coders, and the code that other coders write. Think before you reimplement. Tom