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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.