Open
Description
A lot of ggplot2 code is boilerplate code, that is, repeated section of code with little to no variation.
Think of all the geom_*()
or stat_*()
or scale_*()
constructors, which are all very similar.
It seems to me that this pattern of duplicated code is susceptible to accruing tiny inconsistencies.
Probably, a lot of this code could be generated (semi-)automatically. This would:
- Reduce duplications
- Decrease inconsistencies
- Be easier to maintain
- Be beneficial for extensions too
Notably #5484 started replacing a lot of duplicated scales_*()
code, but I don't think this is systemic enough.