Marcin Wisniowski
06/05/2020, 3:59 PMdoker
06/05/2020, 6:37 PMMarcin Wisniowski
06/05/2020, 8:43 PMval port = Key("port", intType)
, then create a Configuration object, then access your value from the Configuration object using the key object you created. With AutoKonfig you don't need any of that, just val port by IntSetting()
is working by itself, while still allowing you to do all of that customization if needed, but covering most cases without requiring the user to do anything (create key objects and configuration objects). Notice how in AutoKonfig the port
variable is already containing the value from your config file, not a key object than you have to use to retrieve it with proceeding code.
Similarly in Konf, you are creating keys which you then use to access values from Config objects, which is extra effort I wanted to avoid.
It was also a goal for me to have 100% unit test coverage, which both of these libraries lack.
Both of these libraries work great and I tried them (and more) and thought about their API's before designing AutoKonfig. I wanted something which requires the least effort possible for the majority of use cases (and allow more advanced usage, which would be the usual usage for other libraries).doker
06/05/2020, 9:48 PMXavier Hanin
06/06/2020, 11:28 AMantrax
06/07/2020, 10:57 AMMarcin Wisniowski
06/07/2020, 10:32 PMMehdi
06/19/2020, 12:36 PM