DIP10005: Dependency-Carrying Declarations is now available for community feedback

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 29 18:21:02 PST 2016


On 12/28/16 9:47 PM, Chris Wright wrote:
> On Wed, 28 Dec 2016 15:48:46 +0000, deadalnix wrote:
>
>> On Saturday, 24 December 2016 at 15:44:18 UTC, Andrei Alexandrescu
>> wrote:
>>>> A compiler enhancement can do this _without_ a language change.
>>>
>>> The language addition has additional benefits as described by DIP1005.
>>> -- Andrei
>>
>> Yes, question is, are these specific benefits worth adding a language
>> change ?
>
> And the associated detriments. Just imagine opening up phobos and seeing:
>
>   // 1200 lines of code
>   with (import foo)
>   {
>     // 300 lines of declarations...
>     with (import bar)
>     {
>       // 250 lines of additional declarations...
>     }
>   }
>
> All mixed in with structs and functions and conditional compilation, so
> you have a sea of curly braces to wade through and indentation is only a
> mild help.

The D Standard Library will generally specify dependencies with 
declarations. If the point was that the feature can be misused or abused 
if one really tries, I agree. -- Andrei


More information about the Digitalmars-d mailing list