Ink230 / irongoon

2 stars 1 forks source link

HashMap in DataTables is not type safe per table #1

Open Ink230 opened 6 months ago

Ink230 commented 6 months ago

Aside from some preliminary enum safety in accessing a specific dataTable, there is no further type safety or validation logic used when accessing the contents of a data table.

The issue is there is no guarantee what we are reading by indices is the actual data we want and those indices will line up correctly.

Any option on DataTables or DataTables forces a rewrite on how we load CSV (or any file format) into the DataTables. Modifying internal parsers (like CharacterStatsParser) to be the only ones to access DataTables and to provide a wrapper of types or validation on provided values may be more ideal.

The external parsers are written to support swapping to a different file format, potentially one with E2E type support / parsing.