It would be very helpful, if the `property delegat...
# stdlib
g
It would be very helpful, if the
property delegation to map
allows default values. In my case, I have a map which contain configuration parameters. If a parameter is contained, use it, else use the default. Some sort of
Copy code
class MyConfig(params: Map<String, String>) {
    val a by params { "defA" }
    val b by params { "defB" }
    val c by params { "defC" }
}
The current behavior is, that a
NoSuchElementException
is raised when the value isn't found in there. What do you think about this?