metaprogramming
Writing code that adds new behavior or apparent keywords to a language at runtime, as Rails does by adding methods to classes.
As defined in Dhh David Heinemeier Hansson
Where it comes up · 1
- Dhh David Heinemeier Hansson2 claims
Most important claims · 2 of 2Search all claims for “metaprogramming” →
- Metaprogramming lets you add keywords to Ruby so that Rails declarations like 'has_many :comments' look like native language features, creating domain-specific languages tailored to a domain such as describing database relationships at the object level.Dhh David Heinemeier Hansson
- Dynamic typing is the bedrock of what makes Ruby Ruby; adding static typing would make it far uglier, make metaprogramming harder, and force the repetition that Ruby's whole aesthetic was built to eliminate, which is why DHH pulled TypeScript out of his projects like Turbo.Dhh David Heinemeier Hansson