commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles <gil...@harfang.homelinux.org>
Subject Re: [lang] Todo utility class
Date Fri, 16 Mar 2018 11:09:53 GMT
On Fri, 16 Mar 2018 00:35:24 -0700, Bindul Bhowmik wrote:
> On Thu, Mar 15, 2018 at 4:05 PM, Gilles 
> <gilles@harfang.homelinux.org> wrote:
>> Hi.
>>
>> On Wed, 14 Mar 2018 16:51:43 -0500, Matt Benson wrote:
>>>
>>> I have often thought about creating a utility class that allows me 
>>> to
>>> write
>>> skeletal code that still compiles but will remind me to go back and 
>>> finish
>>> it. This is a weird meta area of programming, but here are some 
>>> basic
>>> usage
>>> examples:
>>>
>>> Foo foo = Todo.todo(); //returns null
>>> Bar bar = Todo.todo(THROWING_EXCEPTION); //throws 
>>> NotImplementedException
>>> Baz baz = Todo.todo(RETURNING_NULL, "create a Baz"); //returns null 
>>> and
>>> prints a message to System.err
>>>
>>> I would also think it a good (if odd) idea to make the whole class
>>> deprecated so that its use is flagged in tools, etc.
>>>
>>> Does the community think this code would be suited to the 
>>> commons-lang
>>> component?
>>
>>
>> Perhaps "Commons Testing".
>> IIUC, such calls are not meant to appear in released code.
>
> I would recommend against commons testing. i would assume that
> component would be a dependency with a test scope in most projects,
> making it impossible to use it in the main code.

That is the feature: when about to release, all "Commons Testing"
modules must be in "test" scope, and if they are used in "main",
compilation will fail.
In development, "main" would depend on "Commons Testing" to allow
usage of "Todo".

Gilles

> Regards,
> Bindul
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message