Over the course of the last few years, I have prep...
# language-proposals
a
Over the course of the last few years, I have prepared a package of far-reaching language design proposals significantly improving expressiveness and reducing boilerplate. The list includes in particular • Painless type providers, • First-class logic programming, • Effortless dependency injection As opposed to small incremental improvements, such ideas will only go into development if a significant number of users are eager to have them. Please take a look at https://akuklev.github.io/kotlin/, discuss and share if you would like to see some of these features in Kotlin.
👀 4
😯 1
j
Type providers looks very very hard to implement, thought it would certainly be cool.
h
Some thoughts: 1. The
query
"type" (not sure what to call it) in the second proposal would be very interesting, and I can see definite applications for some unique quantum computing framework support in kotlin, which would be very cool. 2. The dependency injection proposal, as it stands, seems hard to follow and too niche. I don't like the idea of seemingly magic and nested default parameters, and it doesn't solve the issue of wanting to share a singleton object across an application. What if, instead, there was something like a
lateinit object
, similar to a
lateinit var
. It's an object with a constructor that must be called before use and can only be called once, otherwise a special error is thrown. This allows users to manually specify their dependencies on startup, or provide a default.