|
|
|
|
|
by smenko
4269 days ago
|
|
Mate, you should learn Scala before writing about it... scala> def hasUppercase(s: String) = s.exists(_.isUpper) hasUppercase: (s: String)Boolean scala> hasUppercase("Charlie Brown") res2: Boolean = true scala> hasUppercase("schmuck") res3: Boolean = false |
|
Please note that, below, when I refer to a multi-paradigm language, such as Scala, as an OOP language, I am specifically referring to the OOP qualities in that language. And I would like you to ask yourself, if you use a multi-paradigm language to write in the “functional” paradigm, are you actually gaining anything from the OOP qualities of that language? Could you perhaps achieve the same thing, more easily, using a language that is fundamentally “functional”, rather than object oriented?