5 ms·
Which is far better, IMHO
by mister_hn 7y ago
Which is far better, IMHO
- mister_hn 7y agowhy so many negative votes? Isn't C++ a far more battle-tested language than Erlang? Hasn't C++ a far bigger community than Erlang? To all whose concern is Memory Management, learn about C++11 (and newer standards): smart pointers and heavy use of RAII pattern work shamefully good
- eikenberry 7y agoI think it is because with Erlang you get Beam and it is the real treasure of the Erlang ecosystem. It not only manifest the philosophy of Erlang well but, more specifically, provides a battle tested run-time for concurrent applications that you cannot get with C++ as you have to (re-)write that concurrent run-time each time.
- snowAbstraction 7y agoExactly. I worked at a few smaller but established FinTech companies delivery Trading Systems to banks, hedge funds, etc that had built their own unique systems written in C++ for concurrent applications. These systems were battle tested but they were not open-sourced and anyway they could not easily be re-purposed.
- samvher 7y agoI did not downvote but possibly because the idea of "good" and "better" programming languages does not mean much. Different tools have different purposes. If you want to write a network driver for the Linux kernel C++ is probably more suitable but if you quickly want to build a simple chat system Erlang is almost certainly going to make your life a lot easier.
- atemerev 7y agoYes, it is battle-tested, and the testing result was the big failure: memory-related issues and vulnerabilities alone caused billions of dollars of damage, and on their way to cause more. It is generally not a good idea at all to use C++ in network-facing applications.
- cmrdporcupine 7y agoGoogle disagrees with you.
- atemerev 7y agoThe first maxim of software architecture: You Are Not Google. (And even at Google most systems running C++ code are their core indexing and analytical systems, which are not directly related to their Internet-facing perimeter; there are some exceptions, of course).
- cmrdporcupine 7y agoYes yes, but I work at Google :-) That said, looking back at previous jobs there are many places -- particularly in ad-tech stuff -- where I used Java server side that I now think C++ would have been more appropriate (or these days, Rust). I wasted a lot of hours tuning for garbage collection that I'd love to have back. And yes, there is a crapload of stuff that is internet facing that is C++.
- atemerev 7y agoAddendum: “Unless you are Google” :) Well, at some point it is a matter of personal preferences and tradeoffs. One time, I used to work on a high-frequency trading system written in Java... yes, in the environment with zero tolerance to GC latency. The core system was written with “off-heap Java” style, with memory blocks preallocated... and for the periphery everybody could use regular GC-enabled Java. Could have written everything in C++, but everybody hated C++ so much they preferred heavily modified Java compilers and environments. Afterwards, some parts of the core were rewritten in Rust... and there were no significant performance or other gains, so it was left as is.
- mister_hn 7y agothe device you are running to write this comment hardly disagrees
- EdwardDiego 7y agoBecause subjective opinions on programming languages (C++ good, Erlang less good) are really boring without some reasoning as to why.
- mister_hn 7y agoI explained why: better community, more battle-tested ecosystem compared to Erlang.