Closed Mikhail42 closed 1 year ago
Maybe it is not so relevant for Scala 2, where IDE (Intellij) has better compatibility and suggests some imports (not always), but in Scala 3 it is not so easy. PS: actually in Scala 3 IDE also suggest imports sometimes.
The examples are intended for smile shell, which imports all these already.
Smile has very good documentation, especially scala/javadoc. But some examples in Quick Start guide and, e.g., in "Supervised learning / Classification" contains examples without specified imports: https://haifengl.github.io/quickstart.html
I think it will be better to provide imports in starting guides, at least in non-clear cases, because it will decrease time to use for this really great library.
Another variant is to provide links to examples (to unit tests, in our case). Any test contains fully executable code with needed context, so it is really helpful.