17. Flexibility of Scala makes……… Its quite possible to develop internal DSL (Domain Specific Languages) Example val name = “scala” name contains “a” rather than name.contains(“a”) Wrappers class ShouldWrapper(s: String) { def should = "should was invoked on " + s } implicit def convert(s: String) = new ShouldWrapper(s) “scala”.should Output = java.lang.String = should was invoked on scala
20. Scala is also designed with……… Message passing in mind Between threads So is Android Between processes/applications
21.
22.
23.
24.
25. And finally the shortcomings…… Performance on the Dalvik Virtual Machine Quick Sort of 100 integers and search for a string in Scala = 15.2 sec (java = 5.9 sec) Quick Sort method in Scala = 5.32 sec (Java = 1.051 sec) Memory Lack of support Learning curve