Is AliasAssign Now Official?
Bruce Carneal
bcarneal at gmail.com
Thu Aug 19 17:28:12 UTC 2021
On Thursday, 19 August 2021 at 15:36:00 UTC, Paul Backus wrote:
> On Thursday, 19 August 2021 at 15:24:04 UTC, Basile B. wrote:
>>
>> okay. But would AliasAssign have ever been proposed if the
>> topic of type functions was not there ?
>
> Possibly. The question that lead to type functions being
> proposed in the first place was "what can we do about the
> overhead of recursive templates?" Several possible answers were
> proposed, including type functions, full AST macros,
> enhancements to CTFE, and AliasAssign.
As noted, long compile times were a big motivator. Even more
important, for some, was the need for a more
readable/maintainable meta programming capability. Something
that helped steer common usage back towards the "meta programming
is just programming" ideal and away from the pain of an
increasingly tortured (ab)use of templates.
Adding a new form, like core.reflect for example, undeniably
makes the language broader but it can also make the language
easier to use in practice: less error prone, more familiar, more
debuggable, ...
We'll not drop templates but with thoughtful language addition(s)
their best-practice use can evolve towards an
easier-to-understand and faster-to-compile subset.
More information about the Digitalmars-d
mailing list