Re: Multiple selective imports on one line

2015-12-28 Thread Joakim via Digitalmars-d-learn
On Monday, 28 December 2015 at 14:16:36 UTC, Basile B. wrote: On Monday, 28 December 2015 at 14:09:30 UTC, Joakim wrote: I wish dfmt could do this for us, so that you develop with all the modules imported at the top, then run dfmt and it scopes all the imports and adds the selective import of s

Re: Multiple selective imports on one line

2015-12-28 Thread Basile B. via Digitalmars-d-learn
On Monday, 28 December 2015 at 14:16:36 UTC, Basile B. wrote: On Monday, 28 December 2015 at 14:09:30 UTC, Joakim wrote: I wish dfmt could do this for us, so that you develop with all the modules imported at the top, then run dfmt and it scopes all the imports and adds the selective import of s

Re: Multiple selective imports on one line

2015-12-28 Thread Basile B. via Digitalmars-d-learn
On Monday, 28 December 2015 at 14:09:30 UTC, Joakim wrote: I wish dfmt could do this for us, so that you develop with all the modules imported at the top, then run dfmt and it scopes all the imports and adds the selective import of symbols. I've been thinking about implementing a tool to do th

Re: Multiple selective imports on one line

2015-12-28 Thread Joakim via Digitalmars-d-learn
On Wednesday, 23 December 2015 at 10:51:52 UTC, earthfront wrote: I'm using hackerpilot's excellent textadept plugin + DCD, Dfmt, and Dscanner. Upon saving files, it produces suggestions, much like warnings from the compiler. One suggestion is to use selective imports in local scopes. OK, I'l

Re: Multiple selective imports on one line

2015-12-24 Thread earthfront via Digitalmars-d-learn
On Wednesday, 23 December 2015 at 20:56:39 UTC, Basile B. wrote: This is not available in the grammar. You can still open a duplicate enhancement request. https://issues.dlang.org/show_bug.cgi?id=14704 see also: http://forum.dlang.org/post/trrxoacvpyyqrdfqx...@forum.dlang.org OK. I'm putti

Re: Multiple selective imports on one line

2015-12-23 Thread ZombineDev via Digitalmars-d-learn
On Wednesday, 23 December 2015 at 19:27:31 UTC, earthfront wrote: On Wednesday, 23 December 2015 at 11:12:22 UTC, ZombineDev wrote: Actually array() is from sts.array and correct way to use selective imports is: import std.exception : enforce; import std.array : array; import std.algorithm.iter

Re: Multiple selective imports on one line

2015-12-23 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 23 December 2015 at 19:34:26 UTC, earthfront wrote: On Wednesday, 23 December 2015 at 11:00:19 UTC, Jakob Ovrum wrote: [...] My goal is to import several symbols from different modules on one line. I'm trying to figure out if it's possible or not. It makes the code more concise

Re: Multiple selective imports on one line

2015-12-23 Thread earthfront via Digitalmars-d-learn
On Wednesday, 23 December 2015 at 11:00:19 UTC, Jakob Ovrum wrote: On Wednesday, 23 December 2015 at 10:51:52 UTC, earthfront wrote: Now I'm left with a smattering of lines which are just selective imports from a single module: import std.exception:enforce; import std.algorithm:array; imp

Re: Multiple selective imports on one line

2015-12-23 Thread earthfront via Digitalmars-d-learn
On Wednesday, 23 December 2015 at 11:12:22 UTC, ZombineDev wrote: Actually array() is from sts.array and correct way to use selective imports is: import std.exception : enforce; import std.array : array; import std.algorithm.iteration : filter; import std.functional : memoize; If you want to im

Re: Multiple selective imports on one line

2015-12-23 Thread ZombineDev via Digitalmars-d-learn
On Wednesday, 23 December 2015 at 10:51:52 UTC, earthfront wrote: I'm using hackerpilot's excellent textadept plugin + DCD, Dfmt, and Dscanner. Upon saving files, it produces suggestions, much like warnings from the compiler. One suggestion is to use selective imports in local scopes. OK, I'l

Re: Multiple selective imports on one line

2015-12-23 Thread Jakob Ovrum via Digitalmars-d-learn
On Wednesday, 23 December 2015 at 10:51:52 UTC, earthfront wrote: I'm using hackerpilot's excellent textadept plugin + DCD, Dfmt, and Dscanner. Upon saving files, it produces suggestions, much like warnings from the compiler. One suggestion is to use selective imports in local scopes. OK, I'l

Multiple selective imports on one line

2015-12-23 Thread earthfront via Digitalmars-d-learn
I'm using hackerpilot's excellent textadept plugin + DCD, Dfmt, and Dscanner. Upon saving files, it produces suggestions, much like warnings from the compiler. One suggestion is to use selective imports in local scopes. OK, I'll do that. Now I'm left with a smattering of lines which are just