Uncallable delegates
Walter Bright
newshound2 at digitalmars.com
Thu Oct 22 23:34:43 UTC 2026
On 4/1/2026 7:29 AM, Dukc wrote:
> I have (finally) finished my DIP draft for the [Delegates and qualifier
> transitivity](https://forum.dlang.org/thread/gbrwklyugksqbpksgmgp@forum.dlang.org) idea discussion.
>
> It can be found
> [here](https://gist.github.com/dukc/0ede11a0fcb77b2ff92654ceaa7805e2), and is
> awaiting your feedback.
Calling std library functions makes the DIP harder to understand. Also, examples
that contain more than one qualifier become very hard to understand.
A more understandable DIP would deal with only one qualifier at at time - can it
be implicitly converted or not, and does it apply to the function pointer or the
context pointer?
Whether such calls can be done in @safe or @system should not be a factor. For
example, a pointer to a const cannot modify the const in @system code. @system
code would allow an explicit cast to mutable.
More information about the dip.development
mailing list