Re: The D Scripting Language -- std imports

2010-11-13 Thread spir
On Fri, 12 Nov 2010 23:21:55 +0600
"Alexander Malakhov"  wrote:

> btw, does --eval make "import std.all" or some set of modules ?

Btw, I just had an idea about std imports -- not only for scripting, but for 
general use of D as well: What if D automagically imported a std set of 
modules, _provided_ none of them is explicitely imported?

Then, I guess, people could go on importing manually (eg to reduce size of 
executable) without any change. This also applies to all existing apps, doesn't 
it? A border case would be an app that actually imports nothing -- but is it at 
all possible to do anything?

An interesting debate would be to define this std set ;-) Could it (easily) be 
made configurable?

Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com



Re: The D Scripting Language -- std imports

2010-11-13 Thread Nick Sabalausky
"spir"  wrote in message 
news:mailman.322.1289642939.21107.digitalmar...@puremagic.com...
>On Fri, 12 Nov 2010 23:21:55 +0600
>"Alexander Malakhov"  wrote:
>
>> btw, does --eval make "import std.all" or some set of modules ?
>
>Btw, I just had an idea about std imports -- not only for scripting, but 
>for
>general use of D as well: What if D automagically imported a std set of
>modules, _provided_ none of them is explicitely imported?
>
>Then, I guess, people could go on importing manually (eg to reduce size of
>executable) without any change. This also applies to all existing apps,
>doesn't it? A border case would be an app that actually imports nothing --
>but is it at all possible to do anything?
>
>An interesting debate would be to define this std set ;-) Could it (easily) 
>be
>made configurable?

I like the reasoning, but I think it might be confusing.