Spec-Objects
At the start of implementing this library, several challenges must be overcome. One key challenge is writing the given data structures in Dart syntax. We need to determine how best to represent the most important language features and how to write them in a clear and maintainable way. The optimal approach should not necessarily be the fastest but should prioritize simplicity and understandability, even for people who are not familiar with the project.
To represent language features, we use a structure called "Specs" objects. These objects are used for any significant feature in the library and contain all relevant data to describe the language feature. However, due to the large number of variables involved, using a constructor is impractical. Users cannot easily discern which data is important. To address this, we employ the builder pattern for each feature. This approach allows users to create spec objects with only the necessary data, eliminating the need to understand or provide all possible variables.
Last updated