Hacker News new | ask | show | jobs
by gavinray 1844 days ago
UFCS as a concept is fantastic but the one hangup is that D's language server implementation by the community and its IDE integration can't handle it because of the complexity.

https://github.com/Pure-D/serve-d

https://github.com/Pure-D/code-d

(I can't remember if the Visual Studio extension, VisualD handles UFCS or not)

http://rainers.github.io/visuald/visuald/StartPage.html

It's possible to implement, because Nim's language server handles UFCS, but atm D's doesn't do it (it's written pretty much by one people)

So personally I avoid UFCS except for very simple/common function like "to!" because it breaks the intellisense for that call.

Though if I knew the language inside and out probably I wouldn't care.

It's still my "favorite" language.

-----

SIDE NOTE: This single person wrote the D lang server, and has maintained it, written and maintained the VS Code extension, and other fundamental tooling + libs for years.

https://github.com/sponsors/WebFreak001

If you use D and feel like sponsoring someone, consider sponsoring them, or Rainers (VisualD), or the maintainers or LDC or GDC, also single individuals for the most part.

LDC Maintainer: https://github.com/sponsors/kinke

GDC Maintainer: https://github.com/sponsors/ibuclaw

1 comments

The language server doesn't do it because it's only a parser whereas making UFCS work properly would presumably require a full semantic analyser. By no means impossible to do, just no one has taken the plunge yet.