From: Lady Date: Wed, 14 Jun 2023 02:48:09 +0000 (-0700) Subject: Use configurable metadata for model X-Git-Url: https://git.ladys.computer/Etiquette/commitdiff_plain/e20983aca1b36dd368d52e02ee018c2eaf0ca55f?ds=inline;hp=e20983aca1b36dd368d52e02ee018c2eaf0ca55f Use configurable metadata for model Instead of hardcoding properties and methods, use a schema to generate them. This makes the code significantly dry·er at the cost of some slightly obtuse metaprogramming. The schema format is somewhat minimal and makes some assumptions; this is not intended as a generalist O·W·L processor or anything of the sort. Previously, `TagSystem::Tag` returned a bound class constructor. With this commit, it instead returns a (manually‐defined) constructor function which effectively does the partial application in its function body. Each constructor has its own unique prototype object (inheriting from `Tag.prototype`) and its own static methods (bound forms of `Tag` static methods). Constructors themselves inherit from `Function.prototype` (for now). ---