Archive for the 'Scala' Category
Tim Dysinger wrote some time ago about his unpleasant experiences in a Scala chat channel. My experiences with the Scala community has been nicer. There sometimes is a little bit of FP zealotry but mostly people are willing to help. Perhaps it was his attitude towards the language with “the syntax is verbose, ugly and […]
scala.xml.Node, text/xml and Jersey: How to do REST with Scala
0 Comments Published October 8th, 2008 in Java, Scala, XMLScala has native support for xml in the language via scala.xml.Node
val message = <message>Hello world</message>
There is an excellent book called scala.xml on XML and Scala so this post won’t go into more detail.
Using the XML support in Scala makes it easy to write REST applications with Jersey. I’ve shown how to create JSON with a […]
There is a lot of holladi about DSLs (in Ruby and Scala and everywhere). The secret problem with DSLs that nobody talks about is easy to explain: Growing and designing a language has been shown to be hard. Most people who think they could solve a problem with a DSL are not good language designers […]
There are some discussions about Scala vs. Clojure - which one could replace Java on the VM.
I think the object oriented features of Scala make the language more usable for real world applications.
But the idea of Clojure - tight integration with Java through Iterable and Iterator, implementing Java interfaces, but keeping immutable structures, compared […]
JsonBuilder for Scala, REST and Jersey
5 Comments Published September 18th, 2008 in JSON, Java, Jersey, REST, ScalaHow to generate Json for REST? If you’re suspicious of automatic generation like me?* I’ve created a markup builder which can be used with Json and made a look into the future in my post “The best Markup Builder I could build in Java”:
“Closures in Java 7 will make it much easier to write […]
Compared to my IntelliJ IDEA experience, Netbeans works much better with Scala (but worse with Maven). Netbeans does recognize correct code compared to IDEA - but recognizes illegal code as legal too. For example it doesn’t tell you if you implement all methods from an abstract class. And lots of other things are missing from […]
As a small side note, I’ve got
import javax.ws.rs.{Path, GET, ProduceMime}
@Path(”/hello”)
class HelloResource {
@GET
@ProduceMime(Array(”text/html”))
def hello() = “Hello World”
}
working with Maven2, Jetty and Jersey. Took some time but was interesting. Any ideas for Array(”text/html”) (Scala does’t support varags the same as Java does) Perhaps a clever implicit? Need to think more.
I’ve played around with the latest Scala plugin for IntelliJ IDEA and I consider it alpha quality at best. It’s hard to get compilation going and it gets often confused with parsing (for very basic files, 10 lines of Scala with annotations for Jersey this time). It feels like Eclipse which will also present errors […]
“For” hack with Option monad in Java
20 Comments Published August 6th, 2008 in Haskell, Java, Maybe, Monad, Null, Option, ScalaThere has been some discussion going on in the blogosphere about monads, and especially about the Haskell Maybe monad or the Scala option class. Those are ways to prevent problems with NULL and NPEs that Java lacks. Java returns NULL form many methods to indicate failure or no result. Suppose we have a method which […]
No future for functional programming in 2008 - Scala, F# and Nu
61 Comments Published January 21st, 2008 in Erlang, F#, Functional Programming, Haskell, Java, Scala, ScalabilityOn Lambda the ultimte there is a recent post with a language prediction for 2008, which mainly predicts the rise of functional programming and the rise of Scala in particular: “My prediction is a little bit more conservative, but I predict Scala will gain momentum, and at least one high visibility project will use Scala”. […]