Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
New API and DSL #78
This pull request is based on these experiments: #54
All changes in this pull request are backward compatible. Old tests and containers will continue to work without changes.
The main motivation was the problem with the mutable nature of the
Another problem is
So, I'm trying to create more typesafe API for the scala facade. Here are the main implementation points:
All other stuff in the pull request is based on the ideas above.
What exactly done:
Some minor things:
@dimafeng I added scaladocs with examples to all suite traits and to all important methods. Also, the new API is a lot more compiler friendly. Scala compiler will advise you if you are doing something wrong. I think it would be enough and makes the new API pretty usable without reading README file.
About verbosity — yes, the new API is a bit more verbose. And I didn't find a way to improve this aspect. But, I think more important that it is safer and more compiler friendly, so it's harder to use it in the wrong way. And verbosity is not really bad — just a bit worse than current. This is a current trade off — a bit more verbose but a bit more safe API. And I think safety is more important.