importing modules with non-identifier names

Leandro Lucarella llucax at gmail.com
Sat Oct 31 19:02:25 PDT 2009


Andrei Alexandrescu, el 31 de octubre a las 12:21 me escribiste:
> Has anyone been irked by this? If you have a module called
> 5th-element.d there is no way to import that. I don't think it's a
> major issue, but I'm also seeing it as a limitation that should have
> a better explanation.
> 
> One way to circumvent that may be
> 
> import fifth = "5th-element.d";
> 
> i.e., specify the file as a string and assign to it a regular D
> identifier. Probably similar things have been discussed in the past,
> what's the general impression?

I see this as a non-problem. I usually like short module names, because is
something I have to write all the time since I usually use static or
aliased imports (to be able to keep track of the origin of each symbol).
I even think imports should be "static" by default, but that's another
topic. The thing is, the current scheme tends to make you think about
short and simple module names; and I like that.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
- Tata Dios lo creó a usté solamente pa despertar al pueblo y fecundar
  las gayinas.
- Otro constrasentido divino... Quieren que yo salga de joda con las
  hembras y después quieren que madrugue.
	-- Inodoro Pereyra y un gallo



More information about the Digitalmars-d mailing list