public import and bugs it causes
Walter Bright
newshound1 at digitalmars.com
Sat May 15 10:32:40 PDT 2010
Alex Makhotin wrote:
> Excerpt from http://golang.org/doc/go_spec.html
>> Assume we have compiled a package containing the package clause
>> package math, which exports function Sin, and installed the compiled
>> package in the file identified by "lib/math". This table illustrates
>> how Sin may be accessed in files that import the package after the
>> various types of import declaration.
>>
>> Import declaration Local name of Sin
>>
>> import "lib/math" math.Sin
>> import M "lib/math" M.Sin
>> import . "lib/math" Sin
>>
>
> I think that's better than in D.
> By default it requires me to access fully qualified name of the global.
> Renamed import doesn't require '= '.
> Explicit period required to use exported name without prefix.
> I like less typing, I like the Go!
Yeah, but you have to type the two quotes. Too much typing for me!
More information about the Digitalmars-d
mailing list