7 Hooked on metaprogramming

This chapter covers

  • Applying cross-functional behavior with metaprogramming and reflection
  • Using symbols to create interoperability between different realms in your application
  • Augmenting JavaScript’s internals with symbols
  • Understanding the basics of the Proxy/Reflect APIs
  • Enhancing the execution of methods with decorators
  • Performing leaner error handling with the throw expressions proposal

A program's text is just one representation of the program. Programs are not text. . . . We need a different way to store and work with our programs.

—Sergey Dmitriev, president and co-founder of JetBrains

Imagine a company like Intel that builds CPU chips. To automate a lot of the repetitive tasks, the company programs robots ...

Get The Joy of JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.