![]() |
|
#1
|
|||
|
|||
|
I am forging a new good practice in Object Oriented programming.
You have a method , declared just after the constructor that will return all other methods available there listed. Please always consider this good practice to help you manage your code and trace the methods available for your objects. " Saying Youtube is not enough" |
|
#2
|
|||
|
|||
|
Objective C already has that type of functionality, but I found that even better is making sure that you can generate a JavaDocs type class/method hierarchy directly from the code. It requires that you are a little more anal about how you do comments for class and methods, but basically creates self documenting classes.
__________________
A man's house is his castle - James Otis (and mine is for sale ... want to buy it?) “Simplicity is the ultimate sophistication.” - Leonardo da Vinci "I am a firm believer in the people. If given the truth they can be depended upon to meet any national crisis. The great point is to bring them the real facts...and beer." - Abraham Lincoln "... connect the dots instead of assembling a jigsaw puzzle." - Wil Wheaton |
|
#3
|
|||
|
|||
|
This seems completely pointless to me.
In C, header files list this kind of thing anyway. In higher level languages, there is always something to generate documentation, which will list this. Java has it (javadoc), Python has it (dir/help), all .net languages have it, etc. These are all essentially in comments so that they don't get in the way. On top of that, most IDEs will have a way to jump to specific functions/methods and that will be essentially a list of them. Documentation should not get in the way of functionality. Imagine how messed up your UML is going to get if you have to add list_methods all over the place needlessly. Come to think of it, a list of methods should be in your UML anyway. There's a best practice for you. Except in extenuating circumstances, such as being specifically asked to use some obscure language, if you need to do this then you're doing something wrong. Last edited by ghelyar : 11-11-2009 at 04:11 PM. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
|||||