Re:Kotlin: A New Hope in a Java 6 Wasteland
by dragonwriter on Monday September 28, 2015 @05:34PM
(#10293377)
> If anything, the additional 'complicated' things we use in Scala aren't language features but rather libraries
One thing with Scala is that various features of the language allow libraries to reshape the "feel" of the language, because a number of things that would be fixed in the language in many other languages can be modified by libraries in Scala.
Re:Kotlin: A New Hope in a Java 6 Wasteland
by mike_hearn on Monday September 28, 2015 @06:23PM
(#10293604)
Consider that whilst Kotlin does not support things like function currying and partial application out of the box, they can both be added by a library (funktionale). Kotlin has a focus on DSLs defined in libraries and has a few language features that are intended to make them work better, in this sense, Kotlin and Scala are similar.
Re:Kotlin: A New Hope in a Java 6 Wasteland
by dragonwriter on Monday September 28, 2015 @07:00PM
(#10293751)
Right, but by comparison Scala goes further than Kotlin on this. Consider the case of operators, for instance: Kotlin, like many languages, lets you redefined a predefined set of operators for new types with predefined precedence, Scala lets you create entirely new operators.
To some, this is a strength for Scala -- to others, it is a weakness.
Hmm I'll try to think of some features that we don't use at work that would add additional semantic overhead:
- Inheritance? I mean okay but nobody I work with makes heavy use of this anyways and if I were working in a Scala shop where inheritance was used heavily it would be like working in a different language. So I suppose I'll give you that although I don't see how that makes the language hard to learn or work with.
- Mutable collections + references (vars)? Once again nobody I work with uses these outside of local mutability when they fail to be able to leverage immutable abstractions that do the same thing. If I worked in a Scala shop where mutability was used without care, it would be like working in a different language entirely true.
- while loops? I don't know what else I'm grasping for straws here.
If anything, the additional 'complicated' things we use in Scala aren't language features but rather libraries, mostly scalaz/shapeless.