February 14, 2017 Re: Alias type with different initialiser. | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Colvin | Thanks again.
On Tuesday, 14 February 2017 at 14:08:31 UTC, John Colvin wrote:
> I would recommend making `template from(string moduleName)` global (maybe in a utils module?), there's no reason for it to be a member of Initial.
Yes, I think there is high chance it will be part of Phobos, if chosen in favour of DIP 1005.
|
February 14, 2017 Re: Alias type with different initialiser. | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Colvin | On Monday, February 13, 2017 22:59:11 John Colvin via Digitalmars-d-learn wrote:
> Also, it's
> generally a bad idea to define `.init` for any type as code
> generally expects this to be the compiler-generated property
> (e.g. a value of type Initial!(int, 1) not of type int).
And there's actually a decent chance that at some point, it will become illegal precisely because of the problems that it causes to allow it.
- Jonathan M Davis
|
Copyright © 1999-2021 by the D Language Foundation