module(system) Identifier;
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Dec 14 10:36:56 PST 2008
BCS wrote:
> Reply to Walter,
>
>> bearophile wrote:
>>
>>> The last changelog of D2:
>>> http://www.digitalmars.com/d/2.0/changelog.html#new2_021
>>> Says:
>>>
>>>> Added -safe switch and module(system) Identifier; syntax.<
>>>>
>>> I am not sure that's the best solution.
>>>
>> Doing it at the module level was deliberate. Not for technical
>> reasons, but to make it easy for people doing quality code reviews.
>> System modules should be segregated and given special attention.
>> Having it dispersed throughout the code modules pretty much excludes
>> being able to abstract it away properly.
>>
>
> A combination of the two might prove useful. Allow bearophile's
> suggestion but only with some variant of module(system) at the top.
> Files using this would still be easy to find but it would also (if the
> internal tag is easy to grep for) limit the lines that need to be reviewed.
>
> Keeping the current form as well would be good.
IMHO it is better to keep system-fu at the module level instead of
sprinkled all over. This is exactly a case when, counter-intuitively,
more restrictive is better. This restrictions will help people organize
code with few low-level modules supporting a large number of safe
modules, instead of fostering insertion of inline unsafe things whenever
it seems fit.
Andrei
More information about the Digitalmars-d
mailing list