Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can do that via reflection and other tactics, yes. You'd better do it with an interface and a cast, as of course "fromString" may not exist.

I also wouldn't use this pattern but, it is possible, and Kotlin is an OOP language.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: