class convention

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

class convention

fschmidt
Administrator
I suggest a convention for classes to make from_doc() the first function since this documents the relationship between the class variables and the lucene fields.
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: class convention

Hugo <Nabble>
I am not sure. The new() function is the most important in my opinion because it shows what we can do with the model object. I don't like to see the new() function at the end of the source file.
Reply | Threaded
Open this post in threaded view
|

Re: class convention

fschmidt
Administrator
new() wouldn't be at the end, it would be second.  Think of a Java class.  The member variables are first.  from_doc() is like this part of the Java code.
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: class convention

Hugo <Nabble>
Okay, I agree.
Reply | Threaded
Open this post in threaded view
|

Re: class convention

fschmidt
Administrator
closing
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture