grogs
Joined 16 years ago
Joined 16 years ago
There's quite a few options in this area. I've recently started using dokku for personal projects. My current plan is to migrate to deis in future if/when I want multiple nodes.
There's a tradeoff between breakage and improvement, but I'd like not to wait 10 years before I can use dotty (like python 2 to python 3). We can always have another dotty in 5 years time for another round of rationalisation/simplification.
FP can model relationships/interactions OK. They just have new tools/techniques to do it. For example, instead of mutating things, you create a copy with the change. You then push the actual state/mutation to the edges of your system (e.g. the database), and thus hopefully make it easier to reason about. But it can be slower or hard to change things deep in an object graph. For slowness - we have persistent collections which re-use unchanged parts of the collection and implement performant "copying". For deep structures, Haskell & Scala have lenses.
It's still an ongoing exploration, with people borrowing/discovering new techniques, but I think it's working quite well and I'm happy to keep exploring.
In the other direction, I've been following Rust. I find it very interesting that it's got a very good type system, but still has mutation. Instead of avoiding mutation, they track ownership in the type system, and thus keep it easier to reason about. By doing this, they make the the performance/memory management easier to reason about, without making it too hard to reason about where effects are happening.
Bare in mind that scalajs has the same issue and a lot of work has already been done!
I ported a site written in vanilla Javascript. I decided to faithfully port it without any changes before introducing scala specific libraries. That was pretty painful. A bunch of manual casting for UndefOr and js.Function.
Since then I've started using some of the scalajs libraries/frameworks straight away on projects. It has been a much more pleasant experience!
Jackson works using reflection. Play JSON therefore at least depends on reflection transatively.
http://gregd.me
[ my public key: https://keybase.io/grogs; my proof: https://keybase.io/grogs/sigs/hlxfkKYLz7Lr8RKBGHsGaqpnugofrm61MpDRddt6LAY ]