
Wasabi – A Sinatra-inspired web framework for Kotlin - chrissie1
http://blogs.lessthandot.com/index.php/WebDev/ServerProgramming/wasabi-a-sinatra-nancyfx-inspired
======
pron
I see that you're using straight-up Netty as the http server. Why did you
choose to take this path rather than use a servlet container (Jetty, Tomcat)?
Are there performance advantages?

~~~
bhauer
To what the author has said, I will add that in terms of performance, Netty is
currently faster than the fastest production Servlet containers [1].
Presently, Undertow (the web server for the upcoming WildFly application
server, which will have a Servlet container) is the only platform providing
slightly faster request-processing performance. Until WildFly is production-
ready, Resin is the highest-performance Servlet container I am aware of.

[1]
[http://www.techempower.com/benchmarks/#section=data-r6&hw=i7...](http://www.techempower.com/benchmarks/#section=data-r6&hw=i7&test=plaintext)

------
danieldk
I wrote some toy programs in Kotlin, can anyone who used it for serious
projects weigh in on how it compares to e.g. Java 8?

~~~
qwerta
I wrote about 10kloc in Kotlin for internal testing framework. It is heavily
multi-threaded and Kotlin aced here (compared to Scala).

Java8 brings lot of legacy stuff. It feels like authors just wanted to add
'functional' on feature list. No type inference or named arguments.

I think it is better to compare Kotlin to Groovy or Scala. In both cases it is
simpler and more elegant language.

I found two problems with Kotlin:

Not mature yet. It is surprisingly stable and bug free (compared to Scala just
4 years ago). But some features are not designed yet and are missing (for
example getters handling). Those will be added in some future milestones. Also
I had to write some boiler plate code which should be in standard library.

Nullability handling is strictly required. Most of classpath API is already
annotated, but I had to annotate external libraries I am using.

~~~
virtualwhys
Interesting, in what ways is Kotlin more elegant that Scala?

~~~
pron
I wouldn't say it's more _elegant_ than Scala, because, unlike, say, Clojure
or Haskell, elegance doesn't seem to be a central design requirement of
Kotlin's, but it is far easier to understand, learn and master. I think Scala
pays a tremendous cost in complexity for its features. Kotlin gives you all of
those features that would interest all but avid Haskellers (and those would be
better off with Haskell than with Scala) for a tiny fraction of the cost.

~~~
virtualwhys
Agreed, there's a price to pay for Scala's elegance (long compile times).

If Kotlin can deliver on the promise to compile _at least as fast_ as Java, it
will find Java converts for sure.

> Kotlin gives you all of those features that would interest all but avid
> Haskellers.

Not so sure about that, Scala runs on the JVM, which is one of the reasons
Twitter, LinkedIn, etc. Big Companies have adopted the former and not the
latter.

Will be interesting to see how things play out. For example, what will Kotlin
provide in the way of a concurrency library like Scala's Akka? Are LINQ and F#
style Type Providers possible in Kotlin given it's mandate for simplicity and
compiler performance?

I suspect Java8 is going to be a thorn in Kotlin's side given that Java8 will
likely already have been given a look at by Java world before Kotlin 1.0 comes
on the scene.

~~~
pron
> Not so sure about that, Scala runs on the JVM, which is one of the reasons
> Twitter, LinkedIn, etc. Big Companies have adopted the former and not the
> latter.

If you look at their code, they, like most Scala developers, hardly ever use
features not found in Kotlin. None of them use the language for its
Haskellesque powers.

> Agreed, there's a price to pay for Scala's elegance (long compile times).

I was referring to mental load and indescribable complexity that makes Haskell
look like child play in comparison - not compilation time. This is the price
Scala pays for _power_ ; I wouldn't in a million years call it elegant, but
some people think it is.

------
RazvanPanda
Why was the Issues tab removed?
[http://i.imgur.com/9jCrGY8.png](http://i.imgur.com/9jCrGY8.png)

~~~
hhariri
We don't use GitHub issue tracker. Issues are tracked with YouTrack here:

[http://hhariri.cloudapp.net:8080/issues/WA](http://hhariri.cloudapp.net:8080/issues/WA)

Support is on Google Groups:

groups.google.com/forum/#!forum/wasabifx

~~~
RazvanPanda
Ah, I missed that in the description, thanks for reply.

