Dynamic languages define the culture of web programming, and Dart web programming tends to use reflection. However, static analysis of reflection is difficult, and hence very little can be omitted from programs via tree shaking during compilation. Consequently, the size of dart2js-generated code causes performance problems during software download and startup. Reflectable is an upcoming package with a transformer that empowers programmers to statically specify how they use reflection, based on metadata. Reflection can then be avoided entirely; it is replaced by a statically generated, customized version of the reflection library, resulting in a considerably smaller compiler output.
- Category
- Tutorials
Sign in or sign up to post comments.
Be the first to comment