Hey <@U2JKKPMEE>: I personally like it much more -...
# koin-contributors
m
Hey @arnaud.giuliani: I personally like it much more - we just need to be sure how this syntax will impact the normal binding definitions. For example, how would that look like:
Copy code
single({ HelloServiceImpl() }) {
  named("whatever")
  createdAtStart()
  bind<HelloService>()
}
If you add the options DSL to the end, you will have the side effect that this won’t work:
Copy code
single { Whatever() } // where is the options?

// To compile, you will need to change it into this?
single({ Whatever() })
Or did you imagine a different syntax for the traditional methods (
single
,
viewModel
, etc)? One alternative design could be something like:
Copy code
single { HelloServiceImpl() } withOptions {
  named("whatever")
  createdAtStart()
  bind<HelloService>()
}
👍 1