Skip to content

Developer's Guide

Satoshi edited this page Oct 3, 2022 · 1 revision

Developer's Guide

This project adheres to the following principles:

  • Should be universally executable.
  • Code should be minimal.
  • Never throw errors.

Should be universally executable

With the advent of Deno, being universally executable (multiple runtimes) has become more important.

This project will emphasize web standard APIs.

Code should be minimal

Code should always be minimal.

One of the difficulties with JavaScript is the tree shaking limitation.

One of the difficulties with JavaScript is the limitation of tree shaking: many bundlers cannot delete class methods that are not yet used. And this poses a challenge that is not easy to achieve.

Classes are not used unless there is a reason to use them.

It is also intended to be used with client JavaScript.

Never throw errors

One of the most difficult parts of JavaScript is error handling.

In most cases, a library should not throw errors. This project is no exception.

This project separates inspection from execution as a way of expressing errors.

Inspection actively collects errors and provides them to the user. Execution will hold on to any errors that may be present.