"Hello D-world!", imports & South African D-naughts
evilrat
evilrat666 at gmail.com
Fri Aug 2 23:51:39 PDT 2013
On Saturday, 3 August 2013 at 05:24:11 UTC, Andre Artus wrote:
> On Saturday, 3 August 2013 at 04:38:13 UTC, Andre Artus wrote:
>> Hello D-world!
>>
>> My name is Andre Artus, and I'm a programmer from
>> Johannesburg, South Africa.
>>
>> I'm relatively new to D, but so far quite impressed by it. I
>> have been reading Andrei Alexandrescu's "The D Programming
>> Language" and Ali Çehreli's "Programming in D" to get up to
>> speed. Both are quite good.
>>
>> 1st Q: Are there other S'frican D'philes on this forum?
>>
>> 2nd Q:
>>
>> I have noticed Andrei's use of the following construct with
>> regard to static imports (p 346):
>>
>> static {
>> import teleport;
>> import time_travel, warp;
>> }
>>
>
> To answer my own question this seems to be an application of
> the AttributeSpecifier rule. Which means that "public" and
> "static" should probably be removed from the ImportDeclaration
> rule.
they shouldn't. static imports is handy that way to reduce
namespace pollution(by forcing fully qualifying names), and
public imports allow import other necessary modules just by
importing one.
More information about the Digitalmars-d-learn
mailing list