Live data from Hacker News

Is Scala Really the Next C++?

codecommit.com

11–20 of 27 posts

Re: Is Scala Really the Next C++?

#11
post #3

Why wouldn't Erlang be the next C++? Erlang's fast, compiled, but still flexible and dynamically, strongly typed. It has a type inference engine so you can look over your code, and it's fairly easy to do IDE integration with Erlang. Erlang's distribution and multi-threading primitives are unbelievably well tested, and everyone could learn a thing or two from the OTP model. I can't imagine why we'd ever consider Scala…

Cause Erlang is a point solution that is totally painful outside of its target domain and has practically no library support.

You can call Java (or Python, Ruby, C etc) libraries from Erlang if you really have to. I'd bet Erlang's libraries would be quite sufficient for a wide range of apps, though.

Where did you run into pain trying to use Erlang outside of telcom apps? Just curious...

Re: Is Scala Really the Next C++?

#12
post #3

Why wouldn't Erlang be the next C++? Erlang's fast, compiled, but still flexible and dynamically, strongly typed. It has a type inference engine so you can look over your code, and it's fairly easy to do IDE integration with Erlang. Erlang's distribution and multi-threading primitives are unbelievably well tested, and everyone could learn a thing or two from the OTP model. I can't imagine why we'd ever consider Scala…

Cause Erlang is a point solution that is totally painful outside of its target domain and has practically no library support.

Also remember where java started (oak) - a much more point solution than what erlang has ever been.

Re: Is Scala Really the Next C++?

#13

Why wouldn't Erlang be the next C++? Erlang's fast, compiled, but still flexible and dynamically, strongly typed. It has a type inference engine so you can look over your code, and it's fairly easy to do IDE integration with Erlang. Erlang's distribution and multi-threading primitives are unbelievably well tested, and everyone could learn a thing or two from the OTP model. I can't imagine why we'd ever consider Scala…

Scala's concurrency model is based on Erlang actually, although the Scala actors are not OS independent like Erlang, but the message passing mechanism and the concept of light weight processes independent of each other exchanging messages( no shared states ) is common to both. Scala runs on the JVM so its much easier to integrate it with huge java projects, and its performance is comparable with Java, and its being p…

Scala's actor library emulates a subset of Erlang's message passing capabilities, but it's far from what Erlang has to offer. Scala's actors are not distributed, they don't have their own heaps (Erlang processes do, to minimize garbage collection sweeps for soft real-time performance), they aren't preemptively scheduled by the VM (the only preemptive scheduling is done by heavy native threads), and they don't have "shared nothing" sematics because Scala lets you send pointers mutable objects between processes. Furthermore, Scala doesn't have hot code swapping or Mnesia, both of which are essential for building scalable fault tolerant systems in Erlang.

Re: Is Scala Really the Next C++?

#14
post #10

Earlier quoted context omitted.

Erlang's fast? Compared to what? Scala is usually about as fast as Java. Not trolling. Genuinely curious.

Erlang is fast if you are using multicore processors because it scales [almost] linerly by performance by core number.

As it's creator said, the main purpose of Erlang is not to be fast, it is to be reliable. Sure, you can throw a lot of processors at it, but at the moment we are still not there (I just bought myself a QuadCore, not a QuazillionCore), and other languages might be able to benefit from more cores, too (once they arrive).

Re: Is Scala Really the Next C++?

#15
post #4

Why wouldn't Erlang be the next C++? Erlang's fast, compiled, but still flexible and dynamically, strongly typed. It has a type inference engine so you can look over your code, and it's fairly easy to do IDE integration with Erlang. Erlang's distribution and multi-threading primitives are unbelievably well tested, and everyone could learn a thing or two from the OTP model. I can't imagine why we'd ever consider Scala…

"I can't imagine why we'd ever consider Scala over Erlang." Primarily because you're forced to use the JVM by some executive degree or similar. Likewise, if you're in a .NET shop you'd want to consider F#. All that aside - I'm a huge Erlang fan.

opps. decree.

Re: Is Scala Really the Next C++?

#16
post #14
post #10

Earlier quoted context omitted.

Erlang is fast if you are using multicore processors because it scales [almost] linerly by performance by core number.

As it's creator said, the main purpose of Erlang is not to be fast, it is to be reliable. Sure, you can throw a lot of processors at it, but at the moment we are still not there (I just bought myself a QuadCore, not a QuazillionCore), and other languages might be able to benefit from more cores, too (once they arrive).

You are totally right, scaling linearly is just a side effect of the shared nothing concurrency- and reliability-based programming model but it's quite a feature anyway!

Re: Is Scala Really the Next C++?

#17
post #3

Why wouldn't Erlang be the next C++? Erlang's fast, compiled, but still flexible and dynamically, strongly typed. It has a type inference engine so you can look over your code, and it's fairly easy to do IDE integration with Erlang. Erlang's distribution and multi-threading primitives are unbelievably well tested, and everyone could learn a thing or two from the OTP model. I can't imagine why we'd ever consider Scala…

Cause Erlang is a point solution that is totally painful outside of its target domain and has practically no library support.

Ya know, when I first this comment on library support I thought "Well kinda..." but after a couple of hours mulling it over not so much.

Erlang has a pretty good set of standard libraries, and whatever missing is relatively easy to build yourself, by comparison.

Granted, there are some very good OS Java libraries, but there's also an awful lot of drivel - one need only fire up their profiler to verify it.

I'd say you're being quite uncharitable to Erlang.

Re: Is Scala Really the Next C++?

#18
post #6

Why wouldn't Erlang be the next C++? Erlang's fast, compiled, but still flexible and dynamically, strongly typed. It has a type inference engine so you can look over your code, and it's fairly easy to do IDE integration with Erlang. Erlang's distribution and multi-threading primitives are unbelievably well tested, and everyone could learn a thing or two from the OTP model. I can't imagine why we'd ever consider Scala…

I think you missed the point of the comparison. One of the reasons C++ took off was that it was deliberately compatible with C (the dominant language at the time), so you didn't have to discard your existing C code and could ramp up from your existing skills. Likewise, today the dominant language is Java, and Scala compiles down to Java bytecode and allows you to continue to use your existing Java libraries. To my kn…

Following the same argument, Clojure and Jython qualify just as well as Scala does.

Re: Is Scala Really the Next C++?

#19
post #4

Why wouldn't Erlang be the next C++? Erlang's fast, compiled, but still flexible and dynamically, strongly typed. It has a type inference engine so you can look over your code, and it's fairly easy to do IDE integration with Erlang. Erlang's distribution and multi-threading primitives are unbelievably well tested, and everyone could learn a thing or two from the OTP model. I can't imagine why we'd ever consider Scala…

"I can't imagine why we'd ever consider Scala over Erlang." Primarily because you're forced to use the JVM by some executive degree or similar. Likewise, if you're in a .NET shop you'd want to consider F#. All that aside - I'm a huge Erlang fan.

"Likewise, if you're in a .NET shop you'd want to consider F#."

Or Scala. It also compiles to the CLR.

Re: Is Scala Really the Next C++?

#20
If C++ had just abandoned it’s C legacy, it would have been a much nicer language.

A much nicer language no one would have used. It is Stroustrup's opinion that if C++ had not been backwards-compatiable with C, it never would have become popular. I agree.

I also have difficulty with calling C++ a "failure."

Post reply on HN