OpenKitten / Meow

MongoDB object persistence for Swift
MIT License
66 stars 3 forks source link

More generics #11

Open Joannis opened 7 years ago

Joannis commented 7 years ago

Currently, many functions require an array or other specific collection type where it's not necessary.

An example: public static func validateDatabaseIntegrity(problemLimit limit: Int = Int.max, types: [_Model.Type]) throws -> [DatabaseProblem] where types could easily be a Set, AnySequence or any other sequence of _Model.Type.

In addition to this, _Model.Type... might make the API more easy, too