February 21, 2018
On Wednesday, 21 February 2018 at 10:47:45 UTC, Eugene Wissner wrote:
> On Wednesday, 21 February 2018 at 10:24:41 UTC, Paolo Invernizzi wrote:
>> On Wednesday, 21 February 2018 at 10:15:48 UTC, Jonathan M Davis wrote:
>>> On Wednesday, February 21, 2018 10:04:01 Kagamin via Digitalmars-d-announce wrote:
>>>> On Tuesday, 20 February 2018 at 22:54:43 UTC, H. S. Teoh wrote:
>>>> > Yeah, personally I'd avoid writing it that way too.
>>>>
>>>> There's no other way to use this feature though.
>>>
>>> Some of us think that it's a bad feature and have no intention of ever using it, though once it's in the language, we all have to worry about dealing with code that does use it.
>>>
>>> - Jonathan M Davis
>>
>> Was there a DIP for that?
>>
>> /Paolo
>
> https://issues.dlang.org/show_bug.cgi?id=13855
> https://github.com/dlang/dmd/pull/6589

And here we are again.




February 21, 2018
On Wednesday, 21 February 2018 at 10:15:48 UTC, Jonathan M Davis wrote:
> On Wednesday, February 21, 2018 10:04:01 Kagamin via Digitalmars-d-announce wrote:
>> On Tuesday, 20 February 2018 at 22:54:43 UTC, H. S. Teoh wrote:
>> > Yeah, personally I'd avoid writing it that way too.
>>
>> There's no other way to use this feature though.
>
> Some of us think that it's a bad feature and have no intention of ever using it, though once it's in the language, we all have to worry about dealing with code that does use it.
>
> - Jonathan M Davis

+1000

how on earth can anyone approve, that syntax like that, can become part of the D Programming language?

I'm really bewildered.

Syntax is EVERYTHING. It can make or break a language.
February 21, 2018
On Tuesday, 20 February 2018 at 08:43:50 UTC, Martin Nowak wrote:
> On Monday, 19 February 2018 at 15:58:57 UTC, Joakim wrote:
>> 17. Allow multiple selective imports from different modules in a single import statement
>>
>> I have a bad feeling that that one is going to be a source of a raft of bugs for years to come.
>
> No need to use it if you don't like it.

I don't think I will.

> It's particularly useful for small examples, localized imports and hacking.

Eh, the problem is it won't be used just for that.

> It's mainly a generalisation of the existing possibility to mix module imports and one selective import at the end.

Yes, I recognize the need for something like that, as I too have been annoyed that I had to split up import lines when adding selective symbols.

> If you prefer java-like 50 lines import manifests, then by all means keep using those.

I don't, but there's a clarity to those that's not there with this.

> How would that feature cause bugs though?

Two ways I can think of, first, local imports was supposed to be a small change and yet here we are fixing symbol leaks with it _years_ later.  Looking at your patch now, it's so small that maybe it won't have those problems.

The other are the ambiguity and readability issues that others have already mentioned, that will trip up D devs for years to come.

I thought about chiming in on that PR when it was open, but didn't because the vote was split at 5-5 and I thought it wouldn't get merged.  Also, I'm not against the idea in principle, but I do wish you'd chosen better syntax, such as not reusing the comma to split modules too.  I don't have a better separator suggestion though, `|`?
February 21, 2018
On Wednesday, 21 February 2018 at 15:33:02 UTC, Joakim wrote:
>
> I thought about chiming in on that PR when it was open, but didn't because the vote was split at 5-5 and I thought it wouldn't get merged.  Also, I'm not against the idea in principle, but I do wish you'd chosen better syntax, such as not reusing the comma to split modules too.  I don't have a better separator suggestion though, `|`?

How about the plain obvious?

import std.stdio:write,writeln,writefln & std.array:join,split,replicate;

February 21, 2018
On Wed, Feb 21, 2018 at 02:46:56PM +0000, psychoticRabbit via Digitalmars-d-announce wrote: [...]
> Syntax is EVERYTHING. It can make or break a language.

And semantics doesn't matter.

:-D


T

-- 
Let's not fight disease by killing the patient. -- Sean 'Shaleh' Perry
February 21, 2018
On Wed, 21 Feb 2018 14:46:56 +0000, psychoticRabbit wrote:

> how on earth can anyone approve, that syntax like that, can become part of the D Programming language?
> 
> I'm really bewildered.
> 
> Syntax is EVERYTHING. It can make or break a language.

It does make sense in moderation for quick scripts, examples, blog posts, etc., where you want to showcase your actual code, not draw attention to the list of imports. Though with the std.scripting (or whatever it was) now, it's perhaps less useful for some of these.

But it likely shouldn't be used in "real" applications; in particular, I think it would be nice for the Phobos style guide to restrict/disallow its use.
February 22, 2018
On Wednesday, 21 February 2018 at 16:58:22 UTC, H. S. Teoh wrote:
> On Wed, Feb 21, 2018 at 02:46:56PM +0000, psychoticRabbit via Digitalmars-d-announce wrote: [...]
>> Syntax is EVERYTHING. It can make or break a language.
>
> And semantics doesn't matter.
>
> :-D
>
>
> T

assert("easy on the eyes" == "easy on the brain");

wtf! I get an assertion failure??

programming languages are just dumb tools to write syntax ;-)

the semantics are in a different domain.

February 22, 2018
On Wednesday, 21 February 2018 at 18:10:51 UTC, rjframe wrote:
> On Wed, 21 Feb 2018 14:46:56 +0000, psychoticRabbit wrote:
> [snip]
>
> But it likely shouldn't be used in "real" applications; in particular, I think it would be nice for the Phobos style guide to restrict/disallow its use.

But whats the point of introducing a new feature and then restricting its use?
Seems like feature itself is buggy or incorrectly implemented then
February 22, 2018
On Wednesday, 21 February 2018 at 10:54:11 UTC, Jonathan M Davis wrote:
> On Wednesday, February 21, 2018 10:24:41 Paolo Invernizzi via Digitalmars-d- announce wrote:
>> On Wednesday, 21 February 2018 at 10:15:48 UTC, Jonathan M Davis
>>
>> wrote:
>> > [...]
>>
>> Was there a DIP for that?
>
> No, and I have no idea whether Walter approved of it or knows anything about it. He may be fine with it, or it may be that another compiler dev merged it, and he didn't notice. The list of DIPs is here, and this definitely isn't one of them:
>
> https://github.com/dlang/DIPs/tree/master/DIPs
>
> When suggestions like this have come up in the past, some of us have been against the idea, and others have loved the idea, but until this beta was released, I had no idea that anyone had actually gone and implemented it.
>
> - Jonathan M Davis

Face palm. Hmm.
February 22, 2018
On Wednesday, February 21, 2018 18:10:51 rjframe via Digitalmars-d-announce wrote:
> On Wed, 21 Feb 2018 14:46:56 +0000, psychoticRabbit wrote:
> > how on earth can anyone approve, that syntax like that, can become part of the D Programming language?
> >
> > I'm really bewildered.
> >
> > Syntax is EVERYTHING. It can make or break a language.
>
> It does make sense in moderation for quick scripts, examples, blog posts, etc., where you want to showcase your actual code, not draw attention to the list of imports. Though with the std.scripting (or whatever it was) now, it's perhaps less useful for some of these.
>
> But it likely shouldn't be used in "real" applications; in particular, I think it would be nice for the Phobos style guide to restrict/disallow its use.

If the concern is scripts, odds are that unless it made a significant difference in compilation time, it would just be better to import the modules without selective imports rather than trying to condense the selective imports into as little space as possible, killing legibility in the process.

- Jonathan M Davis