I think this is a good practice.

Rick

On Tue, Jun 5, 2012 at 6:02 PM, Mark Miesfeld <[email protected]> wrote:
> A question about whether this is a good object orientated practice or not.
>
> This example comes from ooSQLite.
>
> I have a class that is entirely formed with ::constant.  Say I make it
> a mixin class.  Would it be good or poor to have some of the other
> ooSQLite classes inherit it?
>
> ::class 'ooSQLiteConstants' public mixinclass Object
> ::constant ROW           100  /* sqlite3_step() has another row ready */
>
> ::class 'ooSQLiteStmt' public inherit ooSQLiteConstants
>
>
> This would allow the user to do:
>
>  stmt = .ooSQLiteStmt~new(dbConn, "SELECT * FROM foods")
>
>  do while stmt~step == stmt~ROW
>
>
> Actually, with that example, I can see it leads to cluttering up the
> namespace for the methods.
>
> I guess I'm fighting against using constants like:
>
> .ooSQLiteConstants~IOERR_CHECKRESERVEDLOCK
>
> retc = stmt~step
> if retc = .ooSQLiteConstants~IOERR_CHECKRESERVEDLOCK then do
>  -- do something
> end
>
> --
> Mark Miesfeld
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to