To me, it seems that what you really want is boilerplate free constructors. Even on the JVM, there are already some languages that do this quite well, Kotlin and Scala.
You could make the injected annotation a keyword in your language. That way, you would still clearly communicate what a dependency is, and keep the class usable without dependency injection (in tests, for example)
For professional purposes I'm going to stay with .Net for a while. I'm lucky to have enough interesting projects where the challenge is not so much tied to the language.
To me, it seems that what you really want is boilerplate free constructors. Even on the JVM, there are already some languages that do this quite well, Kotlin and Scala.
You could make the injected annotation a keyword in your language. That way, you would still clearly communicate what a dependency is, and keep the class usable without dependency injection (in tests, for example)
Boilerplate free it is :) Thanks for the example.
For professional purposes I'm going to stay with
.Net
for a while. I'm lucky to have enough interesting projects where the challenge is not so much tied to the language.For trying something new Kotlin is indeed a great contender. I've watched KotlinConf 2017 - Introduction to Coroutines by Roman Elizarov just to get an idea and I was pretty impressed.