www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Proposal for custom time string formatting in std.datetime

reply "=?ISO-8859-1?B?Lg==?=" <bitworld qq.com> writes:
Content-Type: text/plain;
	charset="ISO-8859-1"
Content-Transfer-Encoding: base64

T24gMjYvMTIvMjAxMSAxMjo1MSwgemhhbmcgd3JvdGU6DQo8c25pcD4NCj4gPiBUaGUgY29t
cGlsZXIgc2hvdWxkIGRvIHRoaXMuIEEgcGFja2FnZSBpcyBhIGRpcmVjdG9yeSwgYW5kIGEg
bW9kdWxlIGp1c3QgYSBmaWxlLg0KPiA+IFdoZW4gaW1wb3J0aW5nIGEgcGFja2FnZSwgdGhl
IGNvbXBpbGVyIHdpbGwgaW1wb3J0IGFsbCB0aGUgbW9kdWxlcyBpbiB0aGUgcGFja2FnZS4N
Cj4gPiBUaGUgdXNlciBkb2Vzbid0IGNhcmUgYWJvdXQgdGhpcy4NCj4gVGhlIHVzZXIgbWF5
IHdlbGwgY2FyZSBpZiBoZS9zaGUgaXMgY29tcGlsaW5nIHNvbWVvbmUgZWxzZSdzIHByb2pl
Y3QgDQo+IHRoYXQgaW1wb3J0cyB0aGUgd2hvbGUgb2Ygc29tZSBodWdlIGxpYnJhcnkgZGVz
cGl0ZSB1c2luZyBvbmx5IGEgbGl0dGxlIA0KPiBiaXQgb2YgaXQsIGFuZCB0aGlzIGdyZWF0
bHkgaW5jcmVhc2VzIHRoZSB0aW1lIGl0IHRha2VzIHRvIGNvbXBpbGUuIA0KPiBCb3RoIGJl
Y2F1c2Ugb2YgdGhlIHRpbWUgaXQgdGFrZXMgdG8gbG9hZCB0aGUgbW9kdWxlcyBhbmQgYmVj
YXVzZSBvZiANCj4gaGF2aW5nIGEgbGFyZ2VyIHN5bWJvbCB0YWJsZSB0byBsb29rIHRocm91
Z2ggdG8gcmVzb2x2ZSBzeW1ib2xzIGFzIGFuZCANCj4gd2hlbiB0aGV5IGFyZSB1c2VkLg0K
PiBNb3Jlb3ZlciwgdGhlcmUgbWF5IGJlIG1vZHVsZXMgdGhhdCBhcmUgaW50ZW5kZWQgcHJp
bWFyaWx5IGZvciBhIA0KPiBsaWJyYXJ5J3MgaW50ZXJuYWwgdXNlLCB3aGljaCB3b3VsZCBn
ZXQgaW1wb3J0ZWQgYW5kIHRoZXJlYnkgY2x1dHRlciB0aGUgDQo+IHN5bWJvbCB0YWJsZS4N
Cj4gU3Rld2FydC4NCg0KSXQncyBqdXN0IGEgZXh0ZW5kZWQgZnVuY3Rpb24gZm9yIGNvbXBp
bGVyIHRvIGRvIGJhdGNoIGltcG9ydGluZy4gV2Ugc3RpbGwgY2FuIGltcG9ydCB0aGUgbW9k
dWxlcyBvbmUgYnllIG9uZSwgaWYgcmVhbGx5IGNhcmluZyBhYm91dCB0aGUgY29tcGlsaW5n
IHNwZWVkLiBXZSBuZWVkIGFub3RoZXIgbW9yZSBjaG9pY2Uu
Dec 26 2011
parent Stewart Gordon <smjg_1998 yahoo.com> writes:
On 27/12/2011 07:13, . wrote:
<snip>
 It's just a extended function for compiler to do batch importing. We
 still can import the modules one bye one, if really caring about the
 compiling speed. We need another more choice.

True. But maybe the person who wrote a given app didn't care about compiling speed, or has a superfast CPU/hard drive combination so didn't notice it to be slow. And so just imported the whole of druntime, Phobos, Tango, some other library or even a collection of libraries under a common base package. And then a user who has acquired a source distribution of the app finds compilation to take b****y ages. It will take potentially a lot of trial and error to trim the imports down. As such, I feel it's better not to make it too easy to import an entire package. Rather, leave library writers to write an "all" module if it's useful for the library to have one. Such a thing can also be optimised to import modules in an order that is found to be fast. Stewart.
Dec 29 2011