Reimplementing the bulk of std.meta iteratively
Bruce Carneal
bcarneal at gmail.com
Mon Sep 28 02:58:13 UTC 2020
On Sunday, 27 September 2020 at 16:32:18 UTC, claptrap wrote:
> On Sunday, 27 September 2020 at 03:46:52 UTC, Bruce Carneal
> wrote:
>> On Sunday, 27 September 2020 at 02:31:36 UTC, Andrei
>> Alexandrescu wrote:
>>>
>>
>> We're in an early stage of exploration of discovered
>> capability, so I understand the excitement. The C++ guys must
>> have been way excited about their meta programming discoveries
>> as well.
>>
>> Just a respectful reminder here: a discovered way to do
>> something is not a designed way to do something. Cleverness
>> can take you a very very long way (Modern C++ anyone? :-) )
>> but it's unlikely that it will take you to appropriate
>> simplicity.
>
> D: "Look ma I can peel an apple with a tin opener!"
>
> Mom(C++): "That's my boy... the band-aids are in the usual
> place."
Andrei and others advanced us well beyond the mandated cleverness
of C++ meta programming. As Atila has put it, they helped make
things "boring" through very good design. I deeply admire that
work.
I hope and believe that there is another such advance available
to us in the form of type functions. The recently discovered
alternative, reify/dereify, appears to be equivalent in power but
is, comparatively, baroque.
If the two approaches are actually equivalent in power, and in
their ability to address the current template issues, then the
baroque should be preferred if the language is closed to
syntactic additions.
If the language is not closed, then choosing to displace the
already prototyped type function capability with reify/dereify
would represent a lost opportunity to administer another
complexity smackdown.
Disclaimer: Andrei has stated, effectively, that I have little
standing to opine on these issues. It is true that while I use
templates extensively I confine myself to very simple
combinations thereof. I am not experiencing the template pain
reported by others.
Best wishes to those who continue to work in this area. Here's
hoping you lead us to a future that is extremely boring.
More information about the Digitalmars-d
mailing list