[phobos] Proposal of StopWatch module

SHOO zan77137 at nifty.com
Thu Aug 19 09:42:34 PDT 2010


(2010/08/20 0:29), Andrei Alexandrescu wrote:
> On 08/19/2010 08:38 AM, SHOO wrote:
>> (2010/08/19 2:38), Jonathan M Davis wrote:
>>> On Wednesday, August 18, 2010 10:21:56 SHOO wrote:
>>>>> Line 414: no need for @trusted, casting numbers is not unsafe.
>>>>
>>>> Error: cast from const(long) to real not allowed in safe code
>>>
>>> Maybe to!long will work.
>>>
>>
>> But, to!real(long) is system function unfortunately.
>
> I think we should change that to @trusted and file a bug that explicit
> cast from real to long is @safe.
>

I pray for being cured fast.

>> What is the reason why all types must have .init property?
>> I think that structs may not need to have .init property.
>
> The reason is that important primitives such as swap() and move() must
> make sure there exists an "empty" state for all values.
>
>> ... However, I think that this is a very sensitive problem ATST.
>>
>> In the first place, should we use class keyword for the classes(of OOP)?
>> Although there is scope class which seems to satisfy these demands, it
>> does not function well.
>> Isn't improving scope more strongly better than marking scope deprecated?
>
> I agree. The problem is that improving scope in any interesting way is
> next to impossible without interprocedural analysis, which has many
> disadvantages. Therefore I think scope has no chance but deprecation,
> and that we definitely shouldn't design library elements that require or
> recommend it.
>
>
> Andrei

It is a destructive change to deprecated scope and needs mass code 
renewal. What of present scope are you dissatisfied with? The evolution 
that expands present scope if possible is the best.
scope pays the sacrifice and what does get?

I want the page that summarize function/features/modules and reasons 
examining the abolition.


More information about the phobos mailing list