4 ms·
Same here, Scala rocks ! Too bad play 2 is now using guice and promots runtime dependency injection like in Java world. Compile dependency injection is much bet
by gbersac 10y ago
Same here, Scala rocks ! Too bad play 2 is now using guice and promots runtime dependency injection like in Java world. Compile dependency injection is much better, I fear they'll try to mimick spring more and more in order to attract java crowds.
- raphaelj 10y agoI got the same feeling here. Implicits in Scala can act as statically checked dependency injection, I don't know why they are going for this runtime dependant injection instead.
- merb 10y agoPlay supports static DI aka cake pattern or macwire aswell.
- edem 10y agoUntil you start working with Clojure or even Kotlin. Then Scala feels like a baroque behemoth.
- wsargent 10y agoHi, I'm on the Play team. We've got a number of projects showing compile time injection: Java compile time DI: https://github.com/playframework/play-java-compile-di-example https://github.com/playframework/play-java-compile-di-exampl... Java compile time DI using Dagger 2: https://github.com/playframework/play-java-dagger2-example https://github.com/playframework/play-java-dagger2-example Scala compile time DI: https://github.com/playframework/play-scala-compile-di-example https://github.com/playframework/play-scala-compile-di-examp... Scala compile time DI with Macwire: https://github.com/playframework/play-scala-macwire-di-example https://github.com/playframework/play-scala-macwire-di-examp... Thanks!