Re:Deadcode: Finding unreachable functions in Go
by enneff on Tuesday January 23, 2024 @03:35PM
(#39109377)
Go’s reflect package is not “missing” that feature, it is intentionally omitted as it defeats static analysis. In all my years writing Go (14 now), including some tricky metaprogramming, I have never needed to look up a function by name.
[ Parent
| on HN ]
Re:Deadcode: Finding unreachable functions in Go
by erik_seaberg on Tuesday January 23, 2024 @04:07PM
(#39109845)
It creates busywork and ongoing maintenance issues in writing an interpreter. E.g., https://pkg.go.dev/text/template requires every possible function to be manually registered, and that’s not a good use of time.