naming conventions

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

naming conventions

fschmidt
Administrator
We currently have:
Io.Uri()
Lucene.Index()
Lucene.Index().Query
My idea was that these methods are like constructors, and Query is like a module.  But I no longer like this because other methods also return objects and there is no clear distinction.  So now I think only modules should start with upper case.  So now, to use these:
local abc = Io.uri "file:abc"

local Db = Lucene.index(some_dir)
local Query = Db.query
If you want to think of an object as a module, then you can capitalize the local var, but the methods and members remain lower case.  Does this make sense?
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: naming conventions

Hugo <Nabble>
Okay, sounds good to me.
Reply | Threaded
Open this post in threaded view
|

Re: naming conventions

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