4 ms·
And as the original author of Scala.js pointed out in a Scala Days talk today, unrestricted reflection means that it's impossible to do dead code elimination, w
by acjohnson55 11y ago
And as the original author of Scala.js pointed out in a Scala Days talk today, unrestricted reflection means that it's impossible to do dead code elimination, which is a non-starter for real-world use.
- jfoutz 11y agoI've got at least 30 enterprise applications that disagree with your "nonstarter" assertion. Dead code can only exist in real world code.
- acjohnson55 11y agoI'm talking about within the main use case, which is front-end web development. I guess some folks might be cool with 10MB+ JS apps, but I don't think that would be terribly popular, and certainly not popular enough to bother with imitating Java reflection in JavaScript.
- deleted 11y ago[deleted]
- paulddraper 11y agoWell, Proguard does whole program optimization. You have to specify the symbols to preserve explicitly.
- grogs 11y agoI believe that works against jvm bytecode, which you don't get for scalajs. Instead the compiler has a JS specific intermediate representation which the optimizations occur on.