On Mon, Nov 07, 2011 at 06:38:00PM +0000, Gordon Sim wrote: > On 11/07/2011 04:20 PM, Darryl L. Pierce wrote: > >I've been considering, for our newer Ruby APIs, renaming the module > >names to be more like the namespaces used in C++. IOW, right now you > >need to use: > > > >connection = Qpid::Messaging::Connection.new > > > >but I would prefer using: > > > >connection = qpid::messaging::Connection.new > > > >Anybody have a reason not to rename these items? > > What is the general convention for Ruby modules (if indeed there is one)? > > I'm not qualified to comment on that myself, but from a very quick search: > > "Ruby class and module names are also constants, but they are > conventionally written using initial capital letters and camel case, > LikeThis."[1] > > Most tutorials seems to follow that convention also [2],[3]. Any > references supporting lower case modules?
I had done a scan of a few other projects and it seemed to be a mix of both proper and lower case module names. Then while working in the C++ code I was getting some congitive dissonance between the C++ namespace and the Ruby module names. But I suppose the convention in Ruby is good enough reason to keep it as is. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/
pgpPgpC84RztK.pgp
Description: PGP signature
