If you could make any changes to D, what would they look like?
gavinray at example.com
Mon Oct 25 02:04:30 UTC 2021
On Sunday, 24 October 2021 at 19:00:17 UTC, Paul Backus wrote:
> Genuine question: is it really so difficult to write such code
> "by hand"? I understand that language servers are convenient,
> but I find it almost impossible to imagine being completely
> unwilling or unable to write code without one.
Oh no, I do not have much issue with writing things by hand.
It's that using any post-fix/UFCS style function breaks the
Here's a recording to explain what I mean:
[Imgur Video - Dlang Tooling Issues](https://imgur.com/mf0KJk3)
So you see here that:
- The UCFS form of the same function used on a range gives no
suggestions, documentations, etc
- The regular form gives on-hover docs, I can ctrl+click to go to
- Another problem which I didn't mention earlier: the state of D
tooling allows you to pass the wrong types to functions. Here I
pass `string` to a function which only takes `int` and the
linter/lang server does not catch it. Only when I compile will a
warning be showed.
Here's another good visual example with `partition` function:
- Trying to use UCFS to see which methods are available for my
`Range` type, or to select the `partition` function I expect to
see in the list to read the documentation
- Just using regular function calls
More information about the Digitalmars-d