Beyond the veil: What's after type functions

Stefan Koch uplink.coder at googlemail.com
Mon Jan 4 20:37:46 UTC 2021


On Monday, 4 January 2021 at 19:30:31 UTC, Stefan Koch wrote:
> Good Evening, [....]


I just realized one of the key differences between type functions 
and templates.

type functions are more declarative than templates which are more 
generative.

templates build up stuff and to see what it does you have to 
instantiate it.
templates generally don't allow higher level reasoning.

type functions are by nature pure and state transformations or 
reductions.
Which you can reason about in isolation.


More information about the Digitalmars-d mailing list