JimmyCushnie / JECS

Jimmy's Epic Config System
Do What The F*ck You Want To Public License
156 stars 16 forks source link

Do a big refactor of everything #29

Open JimmyCushnie opened 4 years ago

JimmyCushnie commented 4 years ago

The core of this project was written when I was a much less seasoned programmer, and SUCC as a whole is not up to my current standards of code quality. Todo, at some point: refactor the whole damn thing.

JimmyCushnie commented 4 years ago

In particular, good lord BaseTypes needs to be split up into a dozen smaller classes. I started doing this with TypeStrings (d0b2647), but it needs to come to the rest of the base types, ideally with some nice abstraction for classes with base type logic.

This will be absolutely necessary if we add complex arithmetic parsing for float types (#28)

JimmyCushnie commented 4 years ago

Another notable space where code should be improved: instead of hardcoding which collection types are supported (currently Array, List, HashSet), implement an abstract solution that uses ICollection or something. (Though we'll still need special code for Dictionaries)

JimmyCushnie commented 4 years ago

Oh yeah, also we really need a common interface for ReadOnlyDataFile and DistributedData, like ISuccDataContainer. Probably most of the methods, like GetAsDictionary, can be abstracted to extension methods on that interface.