wxruby-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wxruby-dev] Naming questions


From: Kevin Smith
Subject: Re: [Wxruby-dev] Naming questions
Date: 26 May 2003 08:13:15 -0700

On Mon, 2003-05-26 at 07:14, Richard Kilmer wrote:
> MethodNameOne -> method_name_one
> RICHIsFullOfIt -> rich_is_full_of_it
> MethodISITReallyNamedThis -> method_isit_really_named_this

I have been using MixedCase and camelCase so long that I now find the
C/Ruby standard to be completely_ugly_and_offensive, but I do understand
that it's best to fit into your environment. So I may end up generating
aliases for everything--one camelCase and one_with_underbars.

Since you and Curt (aka "my boss") agree on names_like_this, I'll make
the switch. It won't be until my template system is in place, because
then I'll only have to make the change in one place to affect the entire
project (two, if I also want camelCase aliases).

> Also, methods that return a c/c++ based boolean (1 or 0) I change to 
> return a Boolean (true or false) and the method is appended with a 
> question mark (?)...which is a ruby convention for boolean return 
> methods:
> 
> IsThisYourMethod -> is_this_your_method?

I see this as being phase 2: Making the API more Ruby-ish. Another
example is making getters and setters look like attr's. These would also
be aliases, probably, so people could still use the wxWindows docs
without having to do as many mental conversions.

> BTW: Class names should be CamelCase...

True. Which is unfortunate for us because in wxWindows, classes are
camelCase and methods are MixedCase--exactly the opposite of Java. 

> and constants are normally FULLY_CAPITALIZED.

Yes. In wxWindows, constants are already ALL_CAPS (despite what I may
have said earlier).

> Thanks for efforts to move this project along...we in the FreeRIDE 
> group are looking forward to using it (and getting it to work under OS 
> X :-)

You're welcome! I'm having a great time. Thanks for your input!

Kevin






reply via email to

[Prev in Thread] Current Thread [Next in Thread]