Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
repolfx
on July 2, 2019
|
parent
|
context
|
favorite
| on:
Ask HN: Why do new(ish) programming languages esch...
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:
I also wouldn't use this pattern but, it is possible, and Kotlin is an OOP language.