Mavenomics / MavenWorks

Agile Dashboarding, anywhere
https://mavenworks.com
GNU General Public License v3.0
18 stars 2 forks source link

Refine the mental model of the Type system #79

Open quigleyj-mavenomics opened 5 years ago

quigleyj-mavenomics commented 5 years ago

The user-spec for the type system is to treat them as nominal annotations, and not a property of the value that they are paired with (hence why they are sometimes called "typeAnnotation" internally).

There are a variety of reasons for this (some of them admittedly unsatisfying), but it has important implications across the codebase. Any changes to the mental model of types, even at a purely presentational layer, can have knock-on effects down the line.

The current impact of the type system is rather hard to quantify, but it is used in the following components:

It is important to note that these components actually treat types differently:

This hodge-podge of mental models leaves a mess whenever they conflict (as can be seen in #78). We need to come up with a consistent idea of what Types are actually supposed to be, tighten up the type system, and reorient ourselves and the codebase towards that.