TypeFunction example: ImplictConvTargets

foobar foo at bar.com
Wed Oct 7 04:34:59 UTC 2020


On Tuesday, 6 October 2020 at 18:49:08 UTC, Meta wrote:
> On Tuesday, 6 October 2020 at 18:30:15 UTC, Steven 
> Schveighoffer wrote:
>> [...]
>
> Excellent point; the only reason Filter, staticSort, staticMap, 
> Reverse, Repeat, etc., etc. exist is because of the limitations 
> of working with AliasSeq. If type functions can allow us to 
> replace most of these uses with good old std.range/algorithm 
> code, that's a huge win in my book.
>
> We have a big chance to go left when C++ went right and went 
> all-in on template metaprogramming. Let's leave templates to do 
> what they were designed for - genericizing structures and 
> algorithms, and leave the compile-time computation to CTFE + 
> type functions.

C++ has constexpr...

We have a big chance to become a language even bigger than C++ 
without doing anything more. Hooray.


More information about the Digitalmars-d mailing list