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

Re: IMP class and module naming scheme



Daniel Russel wrote:
imp mostly uses get_x() sort of names so far (there are a couple of exceptions).

True, and I think we should stay with that - makes it more obvious that you're calling a (generally const, returning a value) method.

and for other functions I would use CamelCase as well
Currently all classes are CamelCase and all functions_use_underscores. I like having the distinction as C++ can be ambiguous about what is a function and what is an object (in fact, for certain syntax it is undefined whether you are talking about a class or a function).

I agree with Daniel here. Our existing code is lowercase separated by underscores, so we may as well stick with it. Plus, it does remove ambiguity. Plus, the Python folks mandate it for Python methods anyway, so we don't have to rename anything to keep the Python interface clean.

5. using namespace
are we ok with using namespace std for the IMP classes ??
Within a method is fine. Polluting someone else's code or the imp namespace, not so much :-)

Agreed. I'd recommend against "using namespace" if possible.

	Ben
--
                      http://salilab.org/~ben/
"It is a capital mistake to theorize before one has data."
	- Sir Arthur Conan Doyle