Provide better integration with Scala
lilyevsky opened this issue · 3 comments
This is just a suggestion for possible improvement that would encourage more developers to use this library.
I am using Hocon with Scala for a few years, and one annoying aspect is that I have to convert Java objects (especially lists and maps) to Scala explicitly. Also checking whether the element exists before retrieving it - could enjoy using scala Option, or method with default.
I found this Sconfig project while looking for Scala Hocon support. Unfortunately, it looks like it does not give me any advantage compare to the original Lightbend Java library.
I also saw some other projects providing Scala wrappers, but their problem was, they are not actively maintained.
So maybe I will just write my own small wrapper, this should not be hard.
Unless you can create one.
@lilyevsky Thanks for your request. If you have any wrappers that you like or think are good I would definitely look at them. We could also possibly integrate at a lower level as well to avoid a wrapped approach.
I am not a frequent user of this library so I don't have the day to day experience that you have so perhaps you could point to the frequent pain points and even sketch out a API that would be great. We could probably do just about anything if we leave the current API so people can transition.
I know the FP users would probably want some thing more sophisticated. There is PureConfig - https://pureconfig.github.io/
Thanks, I am now using pureconfig.
@lilyevsky Thanks for your interest. It would be nice if pureconfig
could have an integration for sconfig
. Then it could maybe support Scala Native.