I dun a DIP, possibly the best DIP ever
Stefan Koch
uplink.coder at googlemail.com
Fri Apr 24 08:25:01 UTC 2020
On Friday, 24 April 2020 at 04:15:36 UTC, Walter Bright wrote:
> Ok, I've had a chance to think about it. It's a scathingly
> brilliant idea!
>
>
> The AST doesn't have to be walked to make this work, just do it
> as part of the usual bottom-up semantic processing.
>
I honestly don't care about which syntax we chose, but I care
about having the expansion logic be centralized in the compiler.
It almost sounds like you want to make the an inline part of the
regular semantic pass.
If that is done, it's going to be hard to change if we discover
that special handling is needed for particular nodes/node
combinations `.tupleof` comes to mind.
I should also note that the DIP does reduce the size of the trees
to sqrt(N) if the most of the size came from recursive
instantiations of staticMap.
Therefore a bottom-up work if the subtree is not particularly
expensive when compared to having a weaker more inflexible
version of this feature.
More information about the Digitalmars-d
mailing list