retard, el 13 de noviembre a las 08:24 me escribiste: > > void main(string[] args){ > > > > import std.stdio; // 1. will not compile void main(string[] args){ > > writeln("hello"); > > } > > > > main(args); // 2. this should be appended, hence anyway rdmd > should > > analyze > > // if there is main() > > } > > I don't have any opinion of this, but the 1) point make me ask, why > imports can't be used inside methods just like in Scala. There's no > technical reason other than "this adds bugs!" - at least no scientific > research can prove this since Scala hasn't been in wide use that long.
Python allows that too, that's why I opened an enhancement request: http://d.puremagic.com/issues/show_bug.cgi?id=3506 As the bugzilla issue shows, this is particularly annoying when combined with unittest. -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- Hoy estuvimos en el museo de antropología, pero yo voy a volver para estar por lo menos un día ahí adentro... es una locura, como Disney pero de indigenas -- Carla Lucarella (10/2008 contando de su viaje a México)