Thread overview
[dmd-internals] dmd commit, revision 649
Aug 29, 2010
dsource.org
Aug 29, 2010
Michel Fortin
Aug 29, 2010
Brad Roberts
August 29, 2010
dmd commit, revision 649


user: braddr

msg:
Updates to the test suite based on changes to dmd.  Primarily 'auto' -> 'scope'.

http://www.dsource.org/projects/dmd/changeset/649

August 29, 2010
Brad,

Since scope is going to be deprecated, you may want to leave auto as is.

Thanks,

Andrei

On 08/29/2010 03:36 AM, dsource.org wrote:
> dmd commit, revision 649
>
>
> user: braddr
>
> msg:
> Updates to the test suite based on changes to dmd.  Primarily 'auto' ->  'scope'.
>
> http://www.dsource.org/projects/dmd/changeset/649
>
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
August 29, 2010
Le 2010-08-29 ? 9:59, Andrei Alexandrescu a ?crit :

> Since scope is going to be deprecated, you may want to leave auto as is.

This makes me think. Couldn't "scope" be rebranded to mean "needs deterministic destruction" and become strictly an attribute for classes and structs?

This would offer a way out for bug 4621. "scope" applied on a struct or class would simply prevent it from being allocated in the GC-heap, or the absence of "scope" would restrict dereferencing members inside the destructor. Other uses for "scope" would be deprecated. It's embarrassing that the compiler happily compiles racy code such as the one found in bug 4624. (Andrei, that bug is about your code in Phobos by the way.)

bug 4621: http://d.puremagic.com/issues/show_bug.cgi?id=4621 bug 4624: http://d.puremagic.com/issues/show_bug.cgi?id=4624

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



August 29, 2010
Walter checked in an old patch that fixed the compiler to not use 'auto' where 'scope' was intended.. a pre-1.x era change.  This was to update the test suite so the tests pass again.  Having a the test suite fail is unacceptable, so this change wasn't optional.

On 8/29/2010 6:59 AM, Andrei Alexandrescu wrote:
> Brad,
> 
> Since scope is going to be deprecated, you may want to leave auto as is.
> 
> Thanks,
> 
> Andrei
> 
> On 08/29/2010 03:36 AM, dsource.org wrote:
>> dmd commit, revision 649
>>
>>
>> user: braddr
>>
>> msg:
>> Updates to the test suite based on changes to dmd.  Primarily 'auto' ->  'scope'.
>>
>> http://www.dsource.org/projects/dmd/changeset/649
>>