3 ms·
It'd be interesting to see node.js thrown in there. IMO, it and Scala are likely to be the biggest competitors for some of what Erlang's good at.
by davidw 16y ago
It'd be interesting to see node.js thrown in there. IMO, it and Scala are likely to be the biggest competitors for some of what Erlang's good at.
- evgen 16y agoUnlikely. They are providing a small amount of competition for the massive-concurrency sweet spot that Erlang accidentally found itself in, but they do not even begin to provide the basics necessary to play in the reliable/fault-tolerant sphere that Erlang well and truly owns. Node and Scala will definitely pick up mindshare as "like Erlang, but easier if you know [Javascript | Java]" but I have a strong suspicion that they are going to end up feeding people _into_ Erlang in the long run.
- davidw 16y agoLike Java feeds people into Smalltalk? My experience is that some pioneering language does things in a certain way, and then mainstream languages borrow enough of that to be an improvement on what's gone before. Maybe a tiny portion go look up what came before, but mostly not really. "reliable/fault-tolerant sphere that Erlang well and truly owns." - that's not the "some" I was referring to, and it's likely that Erlang will continue to be strong there. However, concurrency is what people are most interested in. People mostly don't care if web apps are as reliable as phone switches, but care a lot about easier models of concurrency.
- evgen 16y agoMore like how Java feeds people into that popular Smalltalk variant known as Ruby. Sometimes mainstream languages can borrow enough features to pass themselves off as "close enough", but it is also frequently the case that attempts to make this move never really catch on. Twisted tried to pull off this same trick for Python and IMHO it never really managed to make the grade until the enhanced generators and yield statements in recent versions of Python allowed people to write code that was not a complicated mass of callback hell. Node.js might thread the needle, but it seems equally likely that the role played by node.js will be subsumed by a better runtime and javascript will be used to write functions and handlers that execute on the Java or Erlang VMs -- to the users/coders the system will appear the same but they will gain the benefits of a stronger set of concurrency primitives in the runtime.
- defen 16y agoThe "problem" with node.js is that it's single threaded, so you need to be careful not to block that thread with long-running operations. Erlang has a scheduler built-in so you don't have to deal with that yourself.
- davidw 16y agoYes, I know that, as I've pointed it out multiple times in the past. Erlang is "better", but, if people writing code for node.js pay attention to how they write code, making the long-running stuff done via callbacks, as they have been doing, it will be "good enough".
- fictorial 16y ago"Long-running" does not always imply "I/O".
- davidw 16y agoYes, I know. I know how Erlang works and what makes it better. But I think that something like node.js really encourages people to not do stupid things like while(true) in actual code, which is why I maintain that, while it's not as good as Erlang, it may be "good enough".
- fictorial 16y agoI agree with you. Node.js is a practical in cases where your app is mostly glue between some client and some other service. CPU intensive apps can be offloaded to other processes (not the Erlang kind) making the driver glue again. So, yes, it works.