g objects in Janet can usually be done with a
factory function. One can wrap the boilerplate of initializing fields and
setting the table prototype using a single function to create a nice interface.
</p>
<pre class="mendoza-codeblock"><code data-language="janet">(<span class="mdzsyn-coresym">defn</span> <span class="mdzsyn-symbol">make-car</span>
 []
 (<span class="mdzsyn-coresym">table/setproto</span> @{<span class="mdzsyn-keyword">:serial-number</span> (<span class="mdzsyn-coresym">math/random</span>)} <