I like your questions. Of course I have no answer for these in general.
But for me personally:
I can see one general area for scala. It is fast reliable data processing.
Because this area requires custom types for each sub domain areas and big performance.
IMHO:The ability to comfortably use custom types with standard libraries without performance overhead is the most powerful feature of scala which is absent in other languages which I have known.
I know only one disadvantage of scala in that area in general. It is a lack of structural types(index-based)
- create custom types
I do not like types from external sources because they lead to orphan tasks which have no good decision. - intergrate custom types with external scala libraries
- decorate jvm libraries which you often need.
- enjoy scala
May be there are different ways. But I do not know area where I will choose scala when I do not need custom types. It seems I will prefer java or kotlin where standard jvm types are enough.
Scala has beautiful string interpolation but I do not prefer plain jvm types in the areas where it is really a very important feature for me.
val guid = g"1322030"
for(v <-SQL"""select id from table t where t.guid= ${guid}
""".as(nStr("id").*).sortBy(_.desc) if v.isNotNull){
...
}
all together with type safety:
- collections
- for comprehension
- string interpolation
- custom types without overhead
- null safety
- external libraries