Proposal: First class types (at compiletime)
Commander Zot
no at no.no
Fri Jul 21 11:53:23 UTC 2023
On Thursday, 20 July 2023 at 21:09:40 UTC, Paul Backus wrote:
> On Thursday, 20 July 2023 at 17:52:38 UTC, TheGag96 wrote:
>> On Thursday, 20 July 2023 at 16:57:16 UTC, jmh530 wrote:
>>> You mean dropping it was a mistake? Or you mean type
>>> functions are a mistake? (if so, can you explain more what
>>> those languages had an issue with)
>>
>> Sorry, I was probably unclear - not going the type functions
>> route was a mistake.
>
> The thing is, none of the existing template stuff is ever going
> away. So the choice is not really between "templates" and
> "first-class types", it's between "templates" and "both".
>
> I agree that, in retrospect, relying on templates for
> metaprogramming was probably a mistake. But at this point,
> there's nothing we can do to fix it short of starting a new
> language from scratch--which is not something the D leadership
> has any interest in.
but without having them, we still have to write recursive
template metaprogramming for things that would be expressed
better with normal functions.
yes, it wouldn't remove old code, but it would be a huge win for
any new code in my opinion.
and I remember walter mention CTFE for calculations as a huge
win, so i'm really not sure if this wouldn't be either. which is
the point why I bring up the topic.
More information about the Digitalmars-d
mailing list