Closed kjs73 closed 10 years ago
Here's my two cents:
We should use const wherever possible. It makes intent much clearer if nothing else.
I'm less thrilled about typedefs. They do increase flexibility, but I'm not sure that we would really take much advantage of it. Do we really ever want to fully support Array
OK, I see your point on the flexibility! Also, with the "auto" type deduction the readability / shortness aspect will probably become less important.
PS: In terms of convention, what do you think about not having "using" in header files, only in ".cpp" files? The advantage is that then there can be no conflicts with the naming by including different headers. Otherwise, we are fixing the "using"s of the header for each file that includes them.
what do you think about not having "using" in header files, only in ".cpp" files?
Yes, this is good practice. We should change it where we see it.
Hi guys,
I agree with Jake, const is good, typedef less good.
Regarding array...I think we should consider transitioning mcpele to use a more complete array structure, like the one provided by the eigen library. I have not done enough research to say whether eigen is the best around but I think that mcpele should be structured so that the user can do manipulation of array as efficiently as possible but also as easily and clearly as possible (numpy style in other words). For example, one might want to do some simple linear algebra manipulation of the arrays without going back to python.
I shall start working on this as soon as we get the more urgent stuff sorted.
The following is not about formatting, but almost.
What do you guys think about having as much as possible?:
These are very minor things, but in my opinion: Point 1 reduces the error potential. Point 2 makes the code more flexible, shorter, and more readable.
On the other hand, I see that both things could be a disadvantage for Python wrapping. Maybe this would make the wrapping more complicated or unclear.