Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Reflection in general isn't the problem, but if you specifically use reflection to look up a method in your program, then dead code elimination gives up. https://go.dev/src/cmd/link/internal/ld/deadcode.go

Taught to me on HN recently: https://news.ycombinator.com/item?id=30041763



Interesting detail, didn’t realize go dead code analysis was this easily made ineffective. 52MB for ec2 SDK is a big chunk of code that must be mostly dead/unused.

Seems like eventually this should become a priority for library writers to support dead code analysis, otherwise going to get worse and worse..




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: