static map as a type function

Stefan Koch uplink.coder at googlemail.com
Wed Sep 23 10:05:24 UTC 2020


On Wednesday, 23 September 2020 at 09:46:54 UTC, Stefan Koch 
wrote:

> So go and download 
> https://github.com/UplinkCoder/dmd/tree/talias_master
> Build your own compiler.
> And play with type functions.

note. type functions are still an experimental feature, certain 
actions will cause the interaction with d-runtime to fail for 
example setting the length of an alias[].
So do expect errors near the end of compilation, I am fixing 
those as fast as my time allows.

Also the -sktf switch has to be thrown for type functions to be 
active since they require a semantic rule to be circumvented. The 
rule being "You can't call a function with types."

That issue is actually a bit tricky to address because of the 
implementation in dmd.
I can't always know which function a call resolves to before 
deciding whether to allow types (iff the function is a type 
function) or not.




More information about the Digitalmars-d mailing list