Udash – Scala and Scala.js Reactive Web Framework
udash.io
udash.io
http://justinhj.github.io/2017/10/11/hacker-news-api-3.html
The other was a simple roman numeral converter
http://justinhj.github.io/2017/08/27/roman-numeral-tool-with...
For me the advantage of UDash is for people that want a type safe Scala "all the way down" web application. One of the downsides is that is difficult to avoid runtime errors, at least to the extent that Elm does (by design).
Another drawback is not being able to simple share a template with designers; they would have to be proficient in Scala at least to the extent they can fix compile errors in the page code.
Some plus sides are that it plays well with Twitter Bootstrap and type safe CSS.
Binding.Scala https://github.com/ThoughtWorksInc/Binding.scala
But this compiler plugin makes it infinitely easier: https://github.com/tek/splain
It's overly engineered with too much clever magic and hence is very reminiscent of frameworks like J2EE Spring which is why people left Java to begin with.
I'm curious why you say Clojure has a steep learning curve.
Most programmers grow up with learning OOP and so throwing all of that out and asking you brain to do everything in reverse is challenging. I know having worked with a dozen J2EE developers in their transition to Clojure. It took at least 3 months to just be productive.
Scala for many people is just Java with a sprinkling of functional and they never really bother to learn the internals or the more complex areas like generic programming e.g. Shapeless/Cats.
Personally I think it's less about FP vs OOP -- even if the OO parts of Scala are familiar, you're going to encounter FP code in Scala, and in general there is a lot more to learn with Scala as a language just to be able to read other people's code effectively.
OOP + FP is actually doing quite well, look at Swift, ReasonML (essentially OCaml, which is also doing fine by itself).
I think that's definitely in the eye of the beholder. The overwhelming opinion I've heard from those in the community is that they greatly prefer having the option, but wouldn't want it required. And that's exactly what spec provides. The language isn't perfect (and honestly, what language is, for every purpose?) but calling it a failure is quite hyperbolic.
as is claiming that Scala is a failure. If adoption and widespread use across industries (big data, hardware, server, web, etc.) is any indicator of success, Scala is just that.
The reality is that both languages are excellent; if you work in either for the day job you're fortunate -- there are far worse languages out there.
Agreed, and I admit I didn't see this as a response to 'dustingetz' equally hyperbolic criticism of Scala. Answering hyperbole with more hyperbole is rarely a way forward for constructive discussion.
It's odd that across so many industries companies would adopt an experimental language; it's almost as if Scala was a stable, production ready language, a successful one even, and that some people have opinions, well founded or not.
> Everyone who gets to be any good at Scala eventually migrates to Haskell or Clojure
The number of Scala developers migrating to Haskell far exceeds that of those migrating to Clojure, probably by a factor of 100X.
> like C++ and we all know how that turned out.
a resounding success? "There are only two kinds of languages: the ones people complain about and the ones nobody uses." Which of the FP languages at hand do people complain about?[1]
[1] https://trends.google.com/trends/explore?q=%2Fm%2F091hdj,%2F...
I had one really bad experience with Scala.js. When I used it, I noticed Scala was just not designed for the web (front end) and it just didn't work well for things really simple in JS.
It's designed for bigger ones especially in which you want to share models and validations between front and back end.
I prefer Kotlin which imho fix almost every bad design decisions from Scala.
Can you elaborate as to what Kotlin fixes compared to Scala?
I tried to use TypeScript but the type system just wasn't good enough; when you've been working in a strongly-typed language like Scala for a while, a language without nominal types or HKT just isn't going to cut it.
Pretty much all Scala code compiles with Scala.js, that includes the Scala standard library, as well as part of the Java standard library that has been reimplemented in Scala.
> How many kilobytes?
Scala.js does whole program optimization and dead code elimination, so there's not a single number that can be given here, you pay for what you use.
While true, in practice as soon as you use, for example, `List`, `Map`, and `Option`, along with various basic collection operations (`flatMap`, `map`, `zip`, ...) you've pulled in basically the entire standard lib*
Wind up paying about a 160KB baseline "tax" to use Scala in the browser, which is well worth it considering that you can ditch jQuery and related plugins (DataTables, Validation, etc.), shedding far more weight than Scala.js in the process. I find it to be a huge win, wish I could use it in current bloated Angular 5 + TypeScript project :\
* This is due in part to existing collections library that is not so amenable to dead code elimination (or at least google closure compiler can't track the full reach of CanBuildFrom's tentacles :)) Maybe this will change in Scala 2.13 collections overhaul, have my doubts, doesn't sound like the new design is radically different than the current one.