digitalmars.D - Should the compiler be able to do a double look up?
- 12345swordy (3/3) Dec 31 2020 Context: https://github.com/dlang/dmd/pull/9702
- Paul Backus (10/13) Dec 31 2020 Lots of things would be able to fix it. The most obvious way
Context: https://github.com/dlang/dmd/pull/9702 Would a double look up be able to fix this bug properly? -Alex
Dec 31 2020
On Thursday, 31 December 2020 at 18:52:18 UTC, 12345swordy wrote:Context: https://github.com/dlang/dmd/pull/9702 Would a double look up be able to fix this bug properly? -AlexLots of things would be able to fix it. The most obvious way would be to have each template alias parameter carry its own (optional) context pointer with it--then there'd be no need for different contexts to fight over who owns the "this" pointer. Unfortunately the implementation of closures and context pointers in DMD is not very high-quality to begin with (see the many, many delegate-related issues in bugzilla), so any actual attempt to solve issue 5710 has to either address or work around the existing technical debt in that part of the frontend.
Dec 31 2020