Only want to say

ddcovery antoniocabreraperez at gmail.com
Wed Jan 13 17:39:51 UTC 2021


On Wednesday, 13 January 2021 at 16:58:31 UTC, Ali Çehreli wrote:
> On 1/12/21 2:46 PM, ddcovery wrote:
>
> > The only small problem I found is you can not import
> exclusive contract
> > dependencies (because you have not a block)... but this is
> not a real
> > problem.
>
> A reminder of the self-important[1] D idiom.
>
> auto foo(string s)
> in (from!"std.uni".isUpper(from!"std.range".front(s))) {
>   return s;
> }
>
> void main() {
>   foo("Hello");
> }
>
> template from(string moduleName)
> {
>   mixin("import from = " ~ moduleName ~ ";");
> }
>
> Ali
>
> [1] https://dlang.org/blog/2017/02/13/a-new-import-idiom/

OMG... thank you Ali!!!




More information about the Digitalmars-d mailing list