3 ms·
> the lack of generics Earnest question: isn't Elixir dynamically typed? If so, how is Go's type system worse? You can always drop down to `interface{}` (the d
by weberc2 8y ago
> the lack of generics
Earnest question: isn't Elixir dynamically typed? If so, how is Go's type system worse? You can always drop down to `interface{}` (the dynamic type) if you like, after all.
> And, while go’s channels are cool, they don’t seem nearly as powerful as elixirs actor model/OTP — at least for this example.
I haven't used Elixir, but I suspect this is true. Elixir/Erlang are probably the only two languages that probably have a better concurrency story than Go; however, there are other facets (tooling, deployment story, learning curve, etc) to consider in choosing a programming language, and I think Go is a really strong language on balance.
- dragonwriter 8y ago> Earnest question: isn't Elixir dynamically typed? If so, how is Go's type system worse? Elixir has built in support for type specifications and supports static analysis for (among other things) typechecking via dialyzer, a static analysis tool from the Erlang distribution for the BEAM VM.
- weberc2 8y agoAre these widely-used? When I tried kicking the tires on Elixir, it seemed like type annotations (specifications?) weren't used in practice, and they also seemed pretty clumsy (I didn't try hard, to be fair).
- pdimitar 8y agoElixir and Go are not mutually exclusive though. As another sibling comment said: they serve different niches. I'd always reach for Elixir/Phoenix for any web app, or even API (if it's a big app). Also anything that requires heavy concurrency -- web spiders, data collectors of many kinds, scatter/gather flows (or any multi-stage flows; Elixir makes those processes brain-dead easy to code) -- then Erlang/Elixir are a no-brainer. People keep wrongfully underestimating them. But if I am to write a CLI app or a very heavy-duty network daemon, Go is IMO hands down unbeaten and the best possible choice. Also anything that requires serious number crunching.
- weberc2 8y ago> Elixir and Go are not mutually exclusive though. To be clear, I claimed nothing to the contrary. :) I only argued that concurrency isn't the only criteria in choosing a programming language for a particular project.
- pdimitar 8y agoTrue. I mostly wrote my reply to help future readers. Sorry, didn't mean to leave you with the impression that you misworded your comment! :)