Another issue I have with the "delegate to map" is...
# announcements
n
Another issue I have with the "delegate to map" is that this escapes the compiler checks for type mismatch and "assign to val": ``` class User(val map: MutableMap<String, Any?>) { val name: String by map } fun main(args: Array<String>) { val map : MutableMap<String, Any?> = mutableMapOf("name" to "John Doe") val user = User(map) println("user.name has ${user.name.length} chars") map["name"] = "Mary" println("user.name has ${user.name.length} chars") try { map.put("name", null) println("user.name has ${user.name.length} chars") } catch (e: Exception) { println(e) } try { map.put("name", 42) println("user.name has ${user.name.length} chars") } catch (e: Exception) { println (e) } }