Re:Rust for Web
by kazagistar on Sunday January 31, 2016 @02:47PM
(#11007713)
Could you show an example of what you mean by "natural looking JSON validation"? I am not sure I have seen what you are referring to.
I think succint is the word I want. Nested validation logic that looks like the object you are validating.
Unfortunately Play docs are not succint, but you may get the idea from here: https://www.playframework.com/documentation/2.3.x/ScalaJsonC...
I tried to implement similar (typesafe) myself using TypeScript: https://github.com/Ciantic/model-validation there are certain problems I hit with TypeScript, and also I don't want my backend to be JavaScript so I've stopped working on it.
Re:Rust for Web
by philippnagel on Sunday January 31, 2016 @02:45PM
(#11007695)
Did you check out D (http://dlang.org) yet?
Not seriously, maybe I should. I know it has some crazy good macro support if I'm correct, this should allow some nice libraries.
Though my first problem with any language is: Does it have type safe SQL builder? Scala has Slick and Quill, and lesser extent JOOQ. Rust has Diesel (not sure how good).
It's pointless to start stringly type the database, when pretty much every backend call needs to access it.
Re:Rust for Web
by fierycatnet on Sunday January 31, 2016 @07:14PM
(#11008815)
There's Clojure too, if you are into that. Check this out http://codahale.com/a-small-nice-thing/
Swift looks promising though, if a bit in flux.
I've been ramming my head against Scala lately, and while it's nice at times I would like to have compiled language.