5 ms·
True, but Go and Erlang don't occupy the same niche. Go is imperative, while Erlang is mostly functional. Go is AOT (ahead-of-time) compiled, while Erlang run
by ngrilly 8y ago
True, but Go and Erlang don't occupy the same niche.
Go is imperative, while Erlang is mostly functional.
Go is AOT (ahead-of-time) compiled, while Erlang runs on a VM.
Go is statically typed, while Erlang is dynamically typed (I know about Dializer).
Go concurrency primitives are designed to coordinate goroutines living in the same process, while Erlang concurrency primitives are designed to coordinate Erlang "processes" living in the Erlang VM or even in multiple Erlang VMs forming a cluster.
- dnautics 8y agoErlang is AOT, the vm reads compiled and optimized bytecode.
- Sharlin 8y agoThe point is that Erlang (like Java etc) needs a runtime, Go doesn't.
- pjmlp 8y agoEvery programming language has a runtime, even Assembly if the CPU is micro-coded. How do you think that the GC, go-routine scheduler, cgo marshaling get managed?
- qznc 8y agoI assume what people want to say is that Go requires nothing which other languages install via the system package manager. While "runtime" is not the correct term, the desire is real. With Java you first install a JVM. With Python you install the interpreter and batteries. This always leads to version conflicts at some point. In contrast, with Go your CI builds an executable, you transfer that to your server and it runs. You don't have to care about the version of some "runtime" already on your server.
- brianwawok 8y agoAnd if you deploy with docker then your build server slaps your java Jar and JRE in a docker image and you deploy one thing. No functional difference.
- merb 8y agowell to be fair you can do the same in java, python whatever. it is just not as easy as go install/go build. heck in c# you actually only need to have dotnet runtime >= your higehst installed version. basically I think .net core 2.1+ does it better than any other tools, it can be published via `--self-contained --runtime linux-x64` or without. (the runtime is needed since you create a launcher executable) it's just dotnet publish with the switch or without and you get a folder that you can copy where you need the runtime or where the runtime + start script is inside the folder. (Java 9+ has something similar but it's way more complicated than just running java publish, etc..)
- pjmlp 8y agoUsing the wrong terms leads to urban myths and misunderstandings. You don't need to install Java at all, because the JVM can be bundled with the application, and for anyone that actually cares to pay for them, the large majority of commercial Java third party vendors have AOT compilers on their JDKs. Likewise with Python, there are several solutions how to bundle a set of scripts with an executable.
- weberc2 8y agoI thought it was pretty obvious that the OP was using "runtime" to refer to an external interpreter program. The significance being the simplicity of deployment.
- pjmlp 8y agoThat is an interpreter as you very well mention.
- marcosdumay 8y agoI didn't think it was all that obvious, and after I read the OP's answers I thought he was complaining about distributable size, instead of deployment procedures.
- ngrilly 8y agoYou're right. I oversimplified a bit too much. I should have write: Go produces native binaries, while Erlang runs on a VM.