Inline imports redivivus
Daniel N
no at public.email
Sat Jul 31 08:46:36 UTC 2021
On Friday, 30 July 2021 at 14:28:41 UTC, Paul Backus wrote:
> On Friday, 30 July 2021 at 14:23:18 UTC, Ogi wrote:
>> On Saturday, 24 July 2021 at 19:52:37 UTC, qxi wrote:
>>> std.datetime::SysTime
>>
>> Why not `std.datetime:SysTime`? This would be consistent with
>> the selective import syntax: `import std.datetime : SysTime`.
>
> A single colon is already used for `goto` labels, so `foo:bar;`
> could be either (a) the statement `bar;` with the label `foo:`,
> or (b) the statement `foo:bar;`, where `foo` is a module and
> `bar` is a symbol in that module.
I guess, one could use a leading dot to disambiguate...
.foo:bar; // not a label
std.datetime:SysTime; // already contains a dot, no need to
disambiguate
+ D already supports leading dot
+ no need to add new tokens/operators
+ consistent with selective import syntax
More information about the Digitalmars-d
mailing list