If you're programming in more advanced languages like Scala or Ceylon, or even JavaScript, "nested functions" or "local functions" are a very common idiom to you. For instance, you'll write things like fibonacci functions as such: def f() = { def g() = "a string!" g() + "– says g" } (Question from Stack Overflow … Continue reading (Ab)using Java 8 FunctionalInterfaces as Local Methods
Category: scala
Reactive Database Access – Part 3 – Using jOOQ with Scala, Futures and Actors
Notice that the examples in this article may be outdated, as Typesafe's Activator works differently now. The blog post will not be maintained to provide up-to-date Activator examples. We're very happy to continue our a guest post series on the jOOQ blog by Manuel Bernhardt. In this blog series, Manuel will explain the motivation behind … Continue reading Reactive Database Access – Part 3 – Using jOOQ with Scala, Futures and Actors
Reactive Database Access – Part 1 – Why “Async”
Notice that the examples in this article may be outdated, as Typesafe's Activator works differently now. The blog post will not be maintained to provide up-to-date Activator examples. We're very happy to announce a guest post series on the jOOQ blog by Manuel Bernhardt. In this blog series, Manuel will explain the motivation behind so-called … Continue reading Reactive Database Access – Part 1 – Why “Async”
jOOQ vs. Slick – Pros and Cons of Each Approach
Every framework introduces a new compromise. A compromise that is introduced because the framework makes some assumptions about how you'd like to interact with your software infrastructure. An example of where this compromise has struck users recently is the discussion "Are Slick queries generally isomorphic to the SQL queries?". And, of course, the answer is: … Continue reading jOOQ vs. Slick – Pros and Cons of Each Approach
The 10 Most Annoying Things Coming Back to Java After Some Days of Scala
So, I'm experimenting with Scala because I want to write a parser, and the Scala Parsers API seems like a really good fit. After all, I can implement the parser in Scala and wrap it behind a Java interface, so apart from an additional runtime dependency, there shouldn't be any interoperability issues. After a few … Continue reading The 10 Most Annoying Things Coming Back to Java After Some Days of Scala
A SQL query DSL for Scala by ScalikeJDBC
There are a tremendous amount of SQL APIs natively written in Scala. Manuel Bernhardt has summarised a nice collection in his a post. Another collection of Scala SQL APIs can be seen in this Stack Overflow question. One API that we want to focus on in particular is ScalikeJDBC (licensed ASL 2.0), which has recently … Continue reading A SQL query DSL for Scala by ScalikeJDBC
Typesafe’s Slick is Not About SQL
We have stumbled upon an interesting thread on the Typesafe SLICK user group where Slick was compared to jOOQ. In that thread, Christopher Vogt has made a couple of interesting statements. But let us have a look at the broader context, first. Unifying Stuff Ever since the proclamation of UDDI or RUP, we may think that … Continue reading Typesafe’s Slick is Not About SQL
Duck Typing in Scala: Structural Typing
Scala goes very far with its loads of features improving the JVM world. Sometimes, a bit too far, maybe. But this feature here is just plain awesome! Typesafe duck typing! An example: def quacker(duck: {def quack(value: String): String}) { println (duck.quack("Quack")) } The above quacker method accepts any "duck" that can quack. Read the full … Continue reading Duck Typing in Scala: Structural Typing
SLICK, integrating SQL into Scala
Now it's official - even if version numbers are still preceded by a "zero" major release: SLICK has been publicly announced by Typesafe: http://blog.typesafe.com/introducing-slick http://finance.yahoo.com/news/typesafe-announces-scala-language-integrated-100000262.html http://java.dzone.com/articles/slicker-scala-stack-qa-martin SLICK stands for Scala Language-Integrated Connection Kit, which is more or less the Scala equivalent for LINQ-to-SQL. Note that I say LINQ-to-SQL, not LINQ in general, as Scala already has … Continue reading SLICK, integrating SQL into Scala
