Module system of D2: to be fixed still

Leandro Lucarella llucax at gmail.com
Wed Apr 22 10:31:41 PDT 2009


grauzone, el 22 de abril a las 18:58 me escribiste:
> Ah, the monthly bearophile modules-must-be-fixed thread. (It was only three times?)
> 
> Here are my ideas/concerns:
> - the current import semantics should be redone such that "import
>   a.b.c.d;" works like "import d = a.b.c.d;", and add a new syntax like
>   "import a.b.c.d.*;" to get the current behavior

Shouldn't be static import a.b.c.d;? It's a little odd to get imported
just the last part. I'm not convinced though.

> - allow to import all modules of a package at once ("import a.b.c.*;")

That's a good idea. The same question as about, if there are a.b.c.d, this
should add a.b.c.d or simply d to the current symbols?

> - allow a shorter syntax to import several modules from the same package ("import a.b.{c, c2, c3};" or similar)

What about the standard syntax: import a.b: c, c2, c3;? I don't know if
that works for modules, though, but I think the syntax can be extended to
allow that.

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
En la calle me crucé con un señor muy correcto, que habitualmente anda en
Falcon; iba corriendo con dos valijas en la mano y dijo: "Voy para Miami,
tiene algún mensaje o ..." y le dije: "No, no, no..."
	-- Extra Tato (1983, Triunfo de Alfonsín)



More information about the Digitalmars-d mailing list