News for hackers. Stuff that matters.
Re:Introducing Hooks by codefined on Thursday October 25, 2018 @06:00PM (#18304955)
> because it's apparently hard to work out all the ways that the method could be invoked

Simple example case of a statement that makes it impossible to minify function names:

    class Test { static func() { /* function code */ } }
    test[prompt('function to call')]()
Re:Introducing Hooks by baddox on Thursday October 25, 2018 @11:11PM (#18306465)
Doesn’t that example also make it impossible to minify the names of anything? Perhaps other than JavaScript modules, since AFAIK the popular module builders like Webpack do compile-time module importing (I believe that even the dynamic import function is recognized at compile time and doesn’t support throwing in a prompt).
Re:Introducing Hooks by AgentME on Monday October 29, 2018 @05:17PM (#18331583)
No, that issue is unique to class/object property names. You can't dynamically reference a variable in a scope by name supplied by a variable in the same way (except by using `eval`, which does in fact cause minifiers and javascript engines to disable a bunch of optimizations in the scope it's used).