On 05.12.2006 01:42, Edwin Fine wrote: > The bottom line seems to be that the current crop of Ruby programmers > are responsible enough not to mess with things under the hood unless > they understand the workings. > > Is this an accurate assessment? I guess so. > What scares me a bit is when Ruby becomes extremely popular and every > second programmer is using it, and less-disciplined developers start > providing libraries that tinker with core classes willy-nilly. At some > point you are going to get clashes between two same-named add-on methods > in (say) Array, that do different things <shudder>. That could be fun to > debug. > > Sure, you can decide not to use such a library, but you have to get > burned first before you realize it's not good to use. I'm probably > showing my age here, but I remember cases where people used to code > macros in C header files (like MIN and MAX) that would clash with other > uses of MIN and MAX and cause untold havoc. Some of these were from > mainstream companies. Actually there are two significant differences between this and modified Ruby core classes: C is compiled and CPP macros are gone by the time the error shows up (it may be that modern C/C++ compilers take care of this when compiling debug code, dunno). You can more easily debug a Ruby lib (provided it has no native parts) than a C lib where you might not have the source code. Also, I believe Ruby more easily encourages the use of unit tests and it avoids a lot other errors (famous buffer overruns) which IMHO makes up for the potential danger of core class modifications. > It's one thing to say "What if I'm stupid?". It's quite another thing to > say, "What if lots of stupid/undisciplined people start using Ruby?" > This tends to be the price of language popularity, I fear. Maybe a bit. But I think the community will take care of this. > Probably, evolutionary forces will get rid of the poorly designed > libraries in time. I'm more worried about the beleaguered corporate IT > developer who often does not have much choice and has to use in-house > code. I think evolution will take care pretty well. :-) Kind regards robert