How about Go's... error on unused imports?

Leandro Lucarella llucax at gmail.com
Sat Nov 14 12:38:00 PST 2009


KennyTM~, el 15 de noviembre a las 03:17 me escribiste:
> >once upon a time there was a suggestion to have a special file that
> >would define the public API of a package.
> >
> >e.g.
> >
> >myPackage
> >a.d
> >b.d
> >...
> >this.d // special file that defines the public imports
> >private.d // should not be imported by a "*" import
> >
> >then, the user can import myPackage.* and that would search for this.d
> >in the directory and use its contents instead of importing all d files
> >in the directory.
> 
> How is it different from using an all.d and import myPackage.all ?

It will just make importing shorter (and it will encourage people to use
the "all" trick as it's part of the language and not just a convention).

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Sé que tu me miras, pero yo me juraría que, en esos ojos negros que
tenés, hay un indio sensible que piensa: "Qué bárbaro que este tipo
blanco esté tratando de comunicarse conmigo que soy un ser inferior en
la escala del homo sapiens". Por eso, querido indio, no puedo dejar de
mirarte como si fueras un cobayo de mierda al que puedo pisar cuando
quiera.
	-- Ricardo Vaporeso. Carta a los aborígenes, ed. Gredos,
		Barcelona, 1912, página 102.



More information about the Digitalmars-d mailing list