syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

kinke via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 14 14:15:54 PST 2017


On Tuesday, 14 February 2017 at 20:03:13 UTC, Jonathan M Davis 
wrote:
> That being said, at some point, you have to ask whether each 
> added feature is worth the cost when you consider how it's 
> going to clutter up function signatures even further. And while 
> I do think that there is value in DIP 1005 and the proposed 
> from template, I also think that it's taking it too far. IMHO, 
> it's just not worth marking functions even further - at least 
> not in most code. Maybe it's worth it in something like Phobos 
> where everyone is using it and benefiting from the compilation 
> speed up, but Walter has been wanting to implement lazy imports 
> anyway, and that would fix the problem without doing anything 
> to any function signatures. It does lose the benefits of tying 
> the imports to the function, but personally, I don't think that 
> that's's worth the extra cost of further cluttering up the 
> function signature. As it is, I'm increasingly of the opinion 
> that local and selective imports aren't worth it. It's just so 
> much nicer to able to slap the required imports at the 
> beginning of the module and forget about them than having to 
> worry about maintaining a list of selective imports or have all 
> of the extra import lines inside of all of the functions. And 
> adding imports to the function signatures is just making the 
> whole local import situation that much worse.

+1. D's beautiful syntax plays a key role for attracting new 
folks, and I see it endangered by recent developments.



More information about the Digitalmars-d mailing list