News for hackers. Stuff that matters.
Re:Deadcode: Finding unreachable functions in Go by mschuster91 on Tuesday January 23, 2024 @03:10PM (#39109057)
And then, people start using reflection (Java), vtables/dynamic lookups (C, C++), eval (JS, PHP) and similar constructs (a lot of languages have them), and suddenly tree-shaking falls apart.

Tree shaking shouldn't be necessary in 2024 anyway.

Re:Deadcode: Finding unreachable functions in Go by icholy on Tuesday January 23, 2024 @04:56PM (#39110503)
Calling vtables "reflection" is a stretch.
Re:Deadcode: Finding unreachable functions in Go by mschuster91 on Tuesday January 23, 2024 @05:04PM (#39110595)
I was merely listing stuff that can break or severely restrict tree-shaking.
Re:Deadcode: Finding unreachable functions in Go by icholy on Tuesday January 23, 2024 @07:18PM (#39111907)
Apologies, I misread your comment. But can you elaborate on your statement that tree-shaking (more commonly referred to as dead-code-elimination) is no longer required?
Re:Deadcode: Finding unreachable functions in Go by mschuster91 on Wednesday January 24, 2024 @03:46AM (#39115120)
Tree shaking was mostly a thing invented in the NodeJS ecosystem for websites to save transfer traffic and thus lead to faster page loads, as well as save a bit of RAM.

Even budget phones routinely have more than 4GB of RAM, and high-speed Internet access is the norm, so you can get away with a lot more inefficiency than just a few years ago.