News for hackers. Stuff that matters.
Re:Unveiling Play 2.1 JSON API Bonus: JSON Inception with Sc... by taligent on Tuesday November 20, 2012 @02:09PM (#4810656)
See this is something I've never understood. What is this obsession with type safety/everything compiled ?

Any possible benefits to the developer disappear in the face of a huge increase in complexity.

Re:Unveiling Play 2.1 JSON API Bonus: JSON Inception with Sc... by gren on Tuesday November 20, 2012 @03:40PM (#4811219)
Making stronger apps?

Let's take the Play 1 vs Play 2 example:

How many times I got a 500 pages in the face due to a basic NullPointerException in Play 1 groovy templates...

In new play 2 templates, because they are type-safe, they guarantee that you will not have those basic errors.

Of-course, it doesn't guarantee everything, but it's way less error-prone. You actually CANNOT make this kind of NPE errors with type-safe scala code.

where in java you do something like:

user.address.town // oops I forgot to test if user.address is not null

in scala:

// user.address.town wouldn't work, because address is represented as an Option[Address]

user.address.map(_.town).getOrElse("")

Re:Unveiling Play 2.1 JSON API Bonus: JSON Inception with Sc... by taligent on Tuesday November 20, 2012 @04:59PM (#4811592)
I do understand your point as far as templates go. But they could have replaced the template engine or even improved on Japid.

It just seems that for the rest of the system there isn't any real benefit over Play1 if you are using Java as opposed to Scala.

Re:Unveiling Play 2.1 JSON API Bonus: JSON Inception with Sc... by boyter on Tuesday November 20, 2012 @02:19PM (#4810724)
It depends on your mindset. I use both and love both but when it comes to massive changes on critical components in huge codebases give me static typing every time.
Re:Unveiling Play 2.1 JSON API Bonus: JSON Inception with Sc... by mandubian on Tuesday November 20, 2012 @03:38PM (#4811212)
typesafety+compiled brings a robustness and sureness (and sometimes performance) that dynamic languages can't really provide. Dynamic languages are interesting in some domains also... I must admit I'm a big fan of static typed language since the beginning so I'm not really objective ;)