This thread completely diverged from the original post, which was propsing `::` instead of `from!`:
``` void fun(T)(std.stdio::File input, T value) if (std.traits::isIntegral!T) {...} ``` instead of: ``` void fun(T)(Module!"std.stdio".File input, T value) if (Module!"std.traits".isIntegral!T) {...} ``` I see it as a clear improvment in readability (see original post for details along with shortcomings of `from!` approach ) On Wed, Feb 15, 2017 at 11:39 AM, Andrei Alexandrescu via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On 02/15/2017 06:20 AM, Daniel N wrote: > >> On Wednesday, 15 February 2017 at 09:22:14 UTC, Daniel N wrote: >> >>> template every(T...) >>> { >>> template satisfies(U...) >>> { >>> enum satisfies = true; >>> } >>> } >>> >> >> (lunch-break => time to hack D!) >> >> template every(T...) >> { >> template satisfies(U...) >> { >> enum satisfies = { >> foreach(t; T) >> foreach(u; U) >> if(!u!t) >> return false; >> return true; >> }(); >> } >> } >> > > That looks pretty neat. Can you find 4-5 cases in which this could be used > gainfully in Phobos? Thanks! -- Andrei > > >