Having jumped back into some green field work in Scala in the past few days, I will say I'm quite impressed with the improvements to the SBT, IntelliJ, universe. Compile time seems to be improved considerably (though the project is still quite small so time will certainly tell). One problem, which is also one of the advantages of scala is that the interop with Java often means that all your Option[] etc code can stil…
You can always use Option() as in: scala> Option(System.getProperty("kaboom")) res1: Option[String] = None then map, getOrElse or fold at will. (edited format)
Scala: the Case for Correctness
11–20 of 63 posts
Re: Scala: the Case for Correctness
#12Scala gets a lot of things right by default. Also it got a lot of flexibility and power. Almost "a framework" to write other languages within the language. Use it every work day for over two years... Like a lot, but sometimes wishes it would be a bit simpler and more aesthetic.
Re: Scala: the Case for Correctness
#13Having jumped back into some green field work in Scala in the past few days, I will say I'm quite impressed with the improvements to the SBT, IntelliJ, universe. Compile time seems to be improved considerably (though the project is still quite small so time will certainly tell). One problem, which is also one of the advantages of scala is that the interop with Java often means that all your Option[] etc code can stil…
You can always use Option() as in: scala> Option(System.getProperty("kaboom")) res1: Option[String] = None then map, getOrElse or fold at will. (edited format)
We've been running scala in production for 4 years, and had our share of NPEs in our code and in the libraries we host. My point I guess was just that it's not entirely true that they will not boil to the surface on occasion.
Re: Scala: the Case for Correctness
#14Scala gets a lot of things right by default. Also it got a lot of flexibility and power. Almost "a framework" to write other languages within the language. Use it every work day for over two years... Like a lot, but sometimes wishes it would be a bit simpler and more aesthetic.
What do you mean by "more aesthetic"? As in syntax?
The type system is crazy powerful, but that also means it's crazy complex.
Re: Scala: the Case for Correctness
#15It seems like these points are true of other Java alternatives as well. What about Ceylon, Fantom, and Kotlin?
Re: Scala: the Case for Correctness
#16e.g you can define your own methods to sugar and desugar for pattern matches, define an apply method to treat a class like a function, or map() on an Option type - it simply behaves as a list of size 0 or 1 and that is all you need to map.
Re: Scala: the Case for Correctness
#17> "the biggest benefit with Scala is correctness."
...before the author goes on to say
> "When I say correctness, I mean the ability to easily and consistently write code that works as inteded (not the academic definition of correctness)"
Re: Scala: the Case for Correctness
#18Re: Scala: the Case for Correctness
#19Another thing I like about Scala is its support for duck-typing like python, except it is actually enforced at compile time via traits and magic methods. e.g you can define your own methods to sugar and desugar for pattern matches, define an apply method to treat a class like a function, or map() on an Option type - it simply behaves as a list of size 0 or 1 and that is all you need to map.