jhc-systems / sqlest

Write SQL in Scala
https://jhc-systems.github.io/sqlest/latest/api/
Apache License 2.0
30 stars 17 forks source link

Make SeqExtractor varargs. #29

Closed DavidGregory084 closed 9 years ago

DavidGregory084 commented 9 years ago

This makes SeqExtractor slightly easier to use in most cases, but still allows

SeqExtractor(Seq(...): _*)
brendanator commented 9 years ago

@DavidGregory084 - I don't think we should do this. Semantically SeqExtractor contains a Seq of Extractors. This matches the original signature whereas the varargs version obscures the meaning

SeqExtractor and all the other Extractors are implementation details that users should not ever have to create themselves. Users will be using ExtractorSyntax in order to create them. SeqExtractor is available within the varargs extract macro - extract[List[String]](...)

Therefore I don't think this change will help people using the library and as it makes the definition less clear it's not worth doing