7 ms·
I think it's comparing apples with oranges. They are two different species a compiled vs VM based language, one is a functional styled vs other has duck-tapping
by maxpert 10y ago
I think it's comparing apples with oranges. They are two different species a compiled vs VM based language, one is a functional styled vs other has duck-tapping. Only thing I can see common is GC and a somewhat but very different concurrency programming paradigms, with message passing. Erlang and BEAM is an aged old giant with battle tested proven reliability, while golang is young lad with the flash like abilities everyone has been longing for. While you get awesome stuff like Hot-Reloading, Go lang gives you compiled code that can run heavy loaded servers on my RaspberryPi (I made one and tried all Erlang, NodeJS, and Golang believe me Golang smokes them all on memory footprint http://raspchat.com http://raspchat.com ). I can go on and on and on! But picking one is totally dependent on your scenario.
- pjmlp 10y ago> They are two different species a compiled vs VM based language This is an implementation detail. Anyone can write a VM for Go, or an AOT compiler to native code for Elixir.
- timClicks 10y agoPretty significant detail though, as no one has done either.. also "anyone" is fairly strong, building decent compilers and interpreters is pretty difficult
- pjmlp 10y agoAnyone with a decent CS degree should be able to produce working compilers and interpreters, otherwise it wasn't a decent degree. Of course, writing very good ones is a different matter.
- Ralfp 10y agoYou are now commiting the moving the goalpost fallacy, arguing first that something is irrevelant because it may be changed larter, and then moving on to argue that every CS degree guy could just write it.
- pjmlp 10y agoI wrote my first compiler using Turbo Pascal for MS-DOS at the age of 17, before getting into the university. A CS degree just makes it easier.
- coldtea 10y ago>Anyone with a decent CS degree should be able to produce working compilers and interpreters, otherwise it wasn't a decent degree. Which would be useless for production without several years of maturity, a tools ecosystem, and a community adopting them -- and of course continued support. So this is mostly theoretical.
- pjmlp 10y agoSo now compilers should only be written, if v1.0 is production ready?! > So this is mostly theoretical. No, it is setting the facts straight about the widespread ignorance of mixing languages with implementations.
- coldtea 10y ago>So now compilers should only be written, if v1.0 is production ready?! No, but they are only relevant for the purposes of the discussion, that is, when considering whether to adopt a language platform based on if it's AOT or interpreted etc, when they are v1.0. That somebody can always make an interpreter for an AOT language, for example, is nothing people care about when checking whether to use a language for their projects. It's what's there that matters.
- pjmlp 10y agoTurning on cynic mode, I would say the only thing that matters is which company backs a programming language and only languages offered on their OS SDKs are relevant. Anything else will just add entropy and development costs to projects, due to 2nd class tooling and lack of libraries on the target platform. Then it doesn't matter how the code gets compiled at all.
- coldtea 10y ago>Turning on cynic mode, I would say the only thing that matters is which company backs a programming language and only languages offered on their OS SDKs are relevant. That's true, but for application programming. For the server side there are other considerations. WhatsApp can get away with using Erlang for example, and still get the sweet billions.
- maxpert 10y agoI think every CS graduate does that as part of Compiler Construction course so rather than questioning people's degree I would say doing these advanced features is not a trivial task.
- josevalim 10y agoThere is an AOT native compiler that ships as part of Erlang called HiPE. The original project has been incorporated into Erlang 15 years ago: https://www.it.uu.se/research/group/hipe/ https://www.it.uu.se/research/group/hipe/ The current setup is also mentioned on Wikipedia's page about AOT: https://en.wikipedia.org/wiki/Ahead-of-time_compilation https://en.wikipedia.org/wiki/Ahead-of-time_compilation
- timClicks 10y agoI was wondering if I should have mentioned HiPE in my comment.. but I couldn't remember if it was fully native. It was a few years ago that I was learning Erlang/Elixir.
- macintux 10y agoI am highly skeptical that the messaging and GC and introspection and hot code loading features of the Erlang VM can be as trivially converted to a compilation model as you assert.
- pjmlp 10y agoProlog, Lisp and Dylan are three examples of languages with AOT compilers available, with semantics similar to Erlang. Also even Erlang has HiPE. http://erlang.org/workshop/2003/paper/p36-sagonas.pdf http://erlang.org/workshop/2003/paper/p36-sagonas.pdf
- maxpert 10y agoMakes me wonder if its trivial why didnt't people just do it last few decades then? Even with AOT you will be shipping some kind of runtime if you want stuff like Hot reload etc.
- pjmlp 10y agoI guess, because most developers use languages as given to them, to create stuff they care about. Not everyone cares about compiler design. Every programming language has a runtime, even Assembly (microcode).
- jeffdavis 10y agoBoth languages seem tailored to network services. It seems fair to compare them for that purpose.
- owaislone 10y agoI think it's a fare comparison. Much more than Rust vs Go which we see all the time. Technically, Rust and Go are more similar to each other than Go and Elixir but Rust and Go are intended for different areas. Go and Elixir on the other hand will compete directly as both have been built to write exactly same kind of software.
- tormeh 10y agoHoare (Go) concurrency is for concurrency within one computer - actor (Elixir) concurrency scales over many computers. This is because actor concurrency is compatible with the realities of networking, and most actor implementations (scala, Erlang/Elixir) provide network transparency.
- maxpert 10y agoRust and Go has not been written for same purpose and they target different audiences. Rust is targeting more towards safe systems programming while Go is mostly being used for network and service stuff. Both can do more obviously but let's not confuse the core usecase.
- owaislone 10y agoYes, that's what I said. When you are starting a project where you need tight control and deal very close to metal, you'd choose between Rust, C++, C, D etc. Go wouldn't even be a choice here. Instead if you project is a higher level application server, you'd choose between Go, Elixir, Erlang, Java, Python, Node etc. Go should be compared with these languages and ecosystems.