4 ms·
What I really want is a language with Elm's type system, simplicity, and syntax, but aimed for backend software instead of HTML apps and with strong support for
by nilkn 10y ago
What I really want is a language with Elm's type system, simplicity, and syntax, but aimed for backend software instead of HTML apps and with strong support for an Erlang-style actor model of multicore, distributed concurrency. Basically something like Elixir, but with Elm's syntax and type safety. In the meantime Elixir will do for me, but I'd really like more type safety without going full Haskell.
- knewter 10y agoThen you'll probably be very excited to read about http://package.elm-lang.org/packages/elm-lang/core/4.0.0/Process http://package.elm-lang.org/packages/elm-lang/core/4.0.0/Pro...
- nilkn 10y agoWell, BEAM has supervisors, supervision trees, loads of support for fault tolerance, automatic usage of multiple cores, and it easily scales to multiple nodes as well. Simple actor-based concurrency is possible in many languages. Also, even if Elm were to get all that stuff, it'd still be compiling to JavaScript and aimed at web apps. (Don't get me wrong, I'm super excited to see Elm getting support for message-passing lightweight processes. I love Elm, have used it myself for several projects, and think this looks great for web development. I just want something like Elm, but specifically geared towards large-scale backend services instead of front-end apps.)
- doppioslash 10y agoNo actually, if you read the announcement you'll find that Elm is keeping platform specific code in the Platform module, to not be locked into being a Javascript-only language forever. So maybe it would take some time, months, years, but Elm could end up running on the BEAM.
- kika 10y agoPurescript? I moved over to it from Elm, exactly because I needed to share the code between frontend and backend and realized that I can't really use Elm on the backend without much effort and risk. Purescript is closer to Haskell than Elm though and as such less "beginner friendly". Monads, typeclasses all that scary stuff. But somehow I handle it okay.
- bmichel 10y agoDid you try dialyzer for Erlang[1] or Elixir[2]? [1]: http://erlang.org/doc/apps/dialyzer/dialyzer_chapter.html http://erlang.org/doc/apps/dialyzer/dialyzer_chapter.html [2]: http://elixir-lang.org/docs/stable/elixir/typespecs.html http://elixir-lang.org/docs/stable/elixir/typespecs.html Not sure it helps, it's on my todo list.
- bjz_ 10y agoDespite some niceties like union types, Dialyzer is pretty limited. For example, here is example of something I would expect to be able to express in a modern type system but is not possible with Dialyzer (as far as I know): @spec foo[a: SomeProtocol & SomeBehaviour](a, a) :: a I've also noticed that it lets through stuff that I would expect to fail to compile, so it's hard to trust as I would a type system like Elm's, Haskell's or Rust's. The Elixir devs have done a great job with the language, and it's great to see the resurgence of interest in BEAM as a result, but I still really wish they had taken the opportunity to build in a decent type system...
- el_tone 10y agoHave you had a look at F#? fsharpforfunandprofit.com
- jiaweihli 10y agoAkka[1] is exactly the library you're looking for. It's available for Scala[2], which lets you use both OOP and FP as needed. (It also runs in Java if you have experience with that.) [1] http://akka.io/ http://akka.io/ [2] http://www.scala-lang.org/ http://www.scala-lang.org/
- curried_haskell 10y agoBut Scala is far from a simple language and Akka makes it even less so.
- Paradigma11 10y agoYou could try f# or c# with http://getakka.net/ http://getakka.net/
- jiaweihli 10y agoScala is more forgiving than Haskell and the parent poster asked for something with Erlang-style actors, which are always going to be complex. I really think this is the best option out there.
- im_down_w_otp 10y agoFor whatever reason the Elixir community doesn't seem to really strongly point people at dialyzer, but what you want is dialyzer, and yes you can use it with Elixir.
- zem 10y agopony is worth a look: http://www.ponylang.org/ http://www.ponylang.org/
- kreetx 10y agoBite the bullet and go full Haskell, it's not that hard, although it seems to appear that way from the outside.