Underscores in method names

Nevin Pratt squeak-dev at lists.squeakfoundation.org
Thu Oct 17 18:42:07 UTC 2002

David Harris wrote:

>Just a thought -- could you translate the names_with_underscores to
>IE - chuck the underscore, and capitalize the first letter of the word?

Obviously that's not hard at all.  That's basically what I did when I 
did the 0.2.5 Glorp port.  And of course, now I have to do it again with 
the 0.2.12 port.  And I'll also have to do it again with every new Glorp 
version after that.  Not good.

Actually, as I review the Glorp code, it appears that it has method 
names that are supposed to match field names in the database, and that 
it uses reflection to do the mapping.  Therefore, not allowing 
underscores in the selectors appears to have the side-effect of not 
allowing underscores in some of the field names in the database.  That's 
not a good result, either.

I'm thinking right now that I'll probably uses Ian's patch, and include 
it with the Squeak Glorp port.  Then for the selectors that _begin_ with 
an underscore, I'll lobby Alan Knight to get those changed in the base 
Glorp distribution (since Ian's patch doesn't handle that case).

But, I'm still looking at it.  Haven't decided for sure.


More information about the Squeak-dev mailing list