DIP61: Add namespaces to D

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 26 16:11:58 PDT 2014


On Saturday, 26 April 2014 at 23:05:23 UTC, Timon Gehr wrote:
> On 04/27/2014 12:43 AM, Dicebot wrote:
>> On Saturday, 26 April 2014 at 21:57:55 UTC, Timon Gehr wrote:
>>> On 04/26/2014 09:27 PM, Daniel Murphy wrote:
>>>>
>>>> We already have a feature to manage conflicts and 
>>>> organisation in D
>>>> code - modules!
>>>
>>> Named mixin templates are a much closer fit.
>>
>> Using named mixin templates for pure scope resolution is side 
>> effect and
>> should be discouraged in any reasonable code.
>
> I don't really advocate using named mixin templates directly as 
> much as just the same lookup rules.

Well that wasn't clear from your comments at all, quite the 
contrary ;)

>> There are specific D tools
>> designed for that  from the very beginning
>
> Named mixin templates are also 'designed for scope resolution 
> from the very beginning' if that means anything.
>
>> and we should use and/or fix those.
>
> They don't fit. You simply cannot have multiple D modules per 
> file.

I don't see any problem with having lot of files. It is natural 
way organizing D code if you consider protection attributes that 
define module as minimal encapsulation unit.


More information about the Digitalmars-d mailing list