Re: A New Import Idiom`

2017-02-14 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Monday, 13 February 2017 at 14:28:20 UTC, Mike Parker wrote: Daniel Nielsen put together a post describing the import idiom that came to light in a recent forum discussion regarding DIP 1005 [3]. The relevant links are at [1] and [2]. [1] https://dlang.org/blog/2017/02/13/a-new-import

Re: A New Import Idiom`

2017-02-14 Thread Arun Chandrasekaran via Digitalmars-d-announce
On Tuesday, 14 February 2017 at 23:01:42 UTC, Dmitry Olshansky wrote: On 2/14/17 3:32 AM, Jerry wrote: Anyways yes this is kind of cool and fascinating how it works, but that aside I hope I never see this used in phobos. Does anyone else feel this way? +1 Let's not make Phobos as scary as

Re: A New Import Idiom`

2017-02-14 Thread Jonathan M Davis via Digitalmars-d-announce
On Wednesday, February 15, 2017 00:01:42 Dmitry Olshansky via Digitalmars-d- announce wrote: > On 2/14/17 3:32 AM, Jerry wrote: > > Anyways yes this is kind of cool and fascinating how it works, but that > > aside I hope I never see this used in phobos. Does anyone else feel this > > way? > > +1 >

Re: A New Import Idiom`

2017-02-14 Thread Dmitry Olshansky via Digitalmars-d-announce
On 2/14/17 3:32 AM, Jerry wrote: Anyways yes this is kind of cool and fascinating how it works, but that aside I hope I never see this used in phobos. Does anyone else feel this way? +1 Let's not make Phobos as scary as C++ STL. --- Dmitry Olshansky

Re: A New Import Idiom`

2017-02-14 Thread kinke via Digitalmars-d-announce
On Tuesday, 14 February 2017 at 02:32:33 UTC, Jerry wrote: Anyways yes this is kind of cool and fascinating how it works, but that aside I hope I never see this used in phobos. Does anyone else feel this way? Yes. +1

Re: A New Import Idiom`

2017-02-13 Thread Daniel N via Digitalmars-d-announce
On Tuesday, 14 February 2017 at 02:32:33 UTC, Jerry wrote: On Monday, 13 February 2017 at 22:40:55 UTC, Ali Çehreli wrote: On 02/13/2017 06:28 AM, Mike Parker wrote: https://www.reddit.com/r/programming/comments/5tt33y/a_new_import_idiom_for_d/ I claimed there is a performance improvement

Re: A New Import Idiom`

2017-02-13 Thread Jerry via Digitalmars-d-announce
On Monday, 13 February 2017 at 22:40:55 UTC, Ali Çehreli wrote: On 02/13/2017 06:28 AM, Mike Parker wrote: https://www.reddit.com/r/programming/comments/5tt33y/a_new_import_idiom_for_d/ I claimed there is a performance improvement in compilation. Can someone answer kibwen's question on this

Re: A New Import Idiom`

2017-02-13 Thread Ali Çehreli via Digitalmars-d-announce
On 02/13/2017 06:28 AM, Mike Parker wrote: https://www.reddit.com/r/programming/comments/5tt33y/a_new_import_idiom_for_d/ I claimed there is a performance improvement in compilation. Can someone answer kibwen's question on this subthread please:

Re: A New Import Idiom`

2017-02-13 Thread Daniel Nielsen via Digitalmars-d-announce
On Monday, 13 February 2017 at 21:04:05 UTC, Johan Engelen wrote: On Monday, 13 February 2017 at 20:09:45 UTC, Daniel Nielsen wrote: I still suspect there will be a difference in real-world applications even with LDC. Why would you expect there to be a difference? Module ctors/dtors are

Re: A New Import Idiom`

2017-02-13 Thread Johan Engelen via Digitalmars-d-announce
On Monday, 13 February 2017 at 20:09:45 UTC, Daniel Nielsen wrote: I still suspect there will be a difference in real-world applications even with LDC. Why would you expect there to be a difference? Module ctors/dtors are still pulled in, regardless of the import being selective or not.

Re: A New Import Idiom`

2017-02-13 Thread Daniel Nielsen via Digitalmars-d-announce
On Monday, 13 February 2017 at 19:41:11 UTC, Johan Engelen wrote: But for a full program, compile time is the same (it's really short so you can't really conclude much from it), and binary size as well (LDC 1.1.0, -O3). For my test cases below, the binaries are identical, except for around 30

Re: A New Import Idiom`

2017-02-13 Thread Johan Engelen via Digitalmars-d-announce
On Monday, 13 February 2017 at 14:28:20 UTC, Mike Parker wrote: Daniel Nielsen put together a post ... [1] https://dlang.org/blog/2017/02/13/a-new-import-idiom/ I also liked the post, nicely written. I didn't check, but if this idiom is not already tested in dmd-testsuite, please add

Re: A New Import Idiom`

2017-02-13 Thread Johan Engelen via Digitalmars-d-announce
On Monday, 13 February 2017 at 15:04:53 UTC, Daniel N wrote: On Monday, 13 February 2017 at 15:00:24 UTC, jmh530 wrote: With the Jack Stouffer comparison, wouldn't it be fairer to do: import std.datetime : Systime; import std.traits : isIntegral; Probably, please help measuring your idea

Re: A New Import Idiom`

2017-02-13 Thread Bastiaan Veelo via Digitalmars-d-announce
On Monday, 13 February 2017 at 14:28:20 UTC, Mike Parker wrote: Daniel Nielsen put together a post [1] https://dlang.org/blog/2017/02/13/a-new-import-idiom/ An entertaining read!

Re: A New Import Idiom`

2017-02-13 Thread Daniel N via Digitalmars-d-announce
On Monday, 13 February 2017 at 16:17:49 UTC, jmh530 wrote: So I tried it again comparing all three versions on my machine. This time I didn't notice a difference in compilation speed or binary size between the version with import std.datetime; import std.traits; and the one with import

Re: A New Import Idiom`

2017-02-13 Thread jmh530 via Digitalmars-d-announce
On Monday, 13 February 2017 at 15:04:53 UTC, Daniel N wrote: Probably, please help measuring your idea and post it here. I intentionally chose a test made by someone else to avoid biasing from my part. It was the only test I found at time of writing. The first time I did it, I got a ~60%

Re: A New Import Idiom`

2017-02-13 Thread Daniel N via Digitalmars-d-announce
]. [1] https://dlang.org/blog/2017/02/13/a-new-import-idiom/ [2] https://www.reddit.com/r/programming/comments/5tt33y/a_new_import_idiom_for_d/ [3] https://forum.dlang.org/thread/tzqzmqhankrkbrfsr...@forum.dlang.org?page=1 A great post. With the Jack Stouffer comparison, wouldn't it be fairer

Re: A New Import Idiom`

2017-02-13 Thread jmh530 via Digitalmars-d-announce
On Monday, 13 February 2017 at 14:28:20 UTC, Mike Parker wrote: Daniel Nielsen put together a post describing the import idiom that came to light in a recent forum discussion regarding DIP 1005 [3]. The relevant links are at [1] and [2]. [1] https://dlang.org/blog/2017/02/13/a-new-import

A New Import Idiom`

2017-02-13 Thread Mike Parker via Digitalmars-d-announce
Daniel Nielsen put together a post describing the import idiom that came to light in a recent forum discussion regarding DIP 1005 [3]. The relevant links are at [1] and [2]. [1] https://dlang.org/blog/2017/02/13/a-new-import-idiom/ [2] https://www.reddit.com/r/programming/comments/5tt33y