[phobos] phobos commit, revision 1919

David Simcha dsimcha at gmail.com
Fri Aug 27 10:23:12 PDT 2010


My bad.  For some reason I kept thinking StopWatch was a class.

On Fri, Aug 27, 2010 at 1:18 PM, SHOO <zan77137 at nifty.com> wrote:

> (2010/08/27 22:21), David Simcha wrote:
>
>> Here's one small cleanup request I noticed when actually using
>> StopWatch.  The following is absurdly verbose and makes me feel like I'm
>> programming in Java:
>>
>> auto sw = new StopWatch(StopWatch.AutoStart.yes);
>>
>> Could we move the AutoStart enum into the module-level namespace instead
>> of the StopWatch class namespace, and maybe give it a default value of
>> yes, just to make instantiating StopWatch less verbose?
>>
>> On 8/22/2010 11:11 AM, dsource.org wrote:
>>
>>> phobos commit, revision 1919
>>>
>>>
>>> user: SHOO
>>>
>>> msg:
>>> Added stopwatch module
>>>
>>> Added StopWatch, Ticks, systime, apptime, comparingBenchmark,
>>> measureTime.
>>>
>>> http://www.dsource.org/projects/phobos/changeset/1919
>>>
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>
>>>
> You can use:
> auto sw = new StopWatch(autoStart);
>
> AutoStart.yes is redundant expression.
> And, it is impossible to make default behavior of the StopWatch
> AutoStart.yes.
>
> This comes from that StopWatch is a struct.
> struct cannot run default behavior.
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20100827/191ed992/attachment.html>


More information about the phobos mailing list