October 11, 2020
On Sunday, 11 October 2020 at 11:48:23 UTC, Stefan Koch wrote:
> __top is the top type.
> that which can hold anything.
> symbols, complete expressions, types, values, tuples.
> anything.

OK thanks. Can it also implicitly hold the context that the expression was used in? If not I don't think we can wrap __traits(compiles).
October 11, 2020
On Sunday, 11 October 2020 at 14:32:17 UTC, Nick Treleaven wrote:
> On Sunday, 11 October 2020 at 11:48:23 UTC, Stefan Koch wrote:
>> __top is the top type.
>> that which can hold anything.
>> symbols, complete expressions, types, values, tuples.
>> anything.
>
> OK thanks. Can it also implicitly hold the context that the expression was used in? If not I don't think we can wrap __traits(compiles).

Well ... I have to think about that.
Sounds hairy if you ask me.
October 12, 2020
On Thursday, 8 October 2020 at 14:08:40 UTC, H. S. Teoh wrote:
> On Thu, Oct 08, 2020 at 12:54:49PM +0000, Adam D. Ruppe via Digitalmars-d wrote:
>> On Thursday, 8 October 2020 at 10:11:59 UTC, Max Samukha wrote:
>> > Wrapping __traits in templates is a necessity if you want to use them for anything interesting (such as passing them to higher order functions):
>> 
>> I kinda wish we had a template lambda.
>
> Me too!!!  I've been avoiding to use Filter, et al, because I'm forced to declare a bunch of helper templates just for trivial predicates. If lambda syntax could be extended to templates, that would make it much nicer to use.

Analogously to
    auto result = range.filter!(function(int i) => i % 1 == 0);
we should make
    alias Result = Filter!(template(T) => is(T == Unqual!T), seq);
a thing.

1 2 3 4 5 6
Next ›   Last »