[Dlang-internal] Frontend Issues w/ implementing UFCS Partial Template Evaluation (for language server use)

Clouudy Swergers123 at gmail.com
Wed Oct 1 23:26:53 UTC 2025


I'm currently developing a language server for D that uses the 
DMD frontend to perform its tasks, but one thing I'm stumped on 
is how to deal with templates and UFCS. From the checking around 
I've done within the compiler, I haven't really found a function 
that can evaluate *only* that the first argument can be used with 
a specific template function, but not check any other arguments 
or unrelated constraints.

Without the ability to perform partial template evaluation, 
completion from libraries such as `std.algorithm` would be 
unwieldy and inaccurate, and the completion suggestions would be 
about as bad as DCD's, or would be hardcoded only for standard 
library functions.

I know that there was already talk about getting a DMD-based 
language server off the ground before I started this project 
myself; I would appreciate it if I could get some help on solving 
this issue (either by suggesting methods for partial evaluation 
or creating them if none are completely workable), so that I can 
help accomplish this. Thank you.


More information about the Dlang-internal mailing list