Bruce Eckel
Posts: 875
Nickname: beckel
Registered: Jun, 2003
|
|
Re: Scala: The Static Language that Feels Dynamic
|
Posted: Jun 14, 2011 9:35 AM
|
|
FYI, I just came across these definitions of concurrency vs. parallelism by Rob Pike, in http://www.infoq.com/interviews/pike-concurrency: "One of the misconceptions about concurrency is people often confuse concurrency and parallelism. Concurrency is a programming model that lets you express things that are independent as independent executions, and parallelism is about running two things at the same time. They are not the same idea and a lot of people confuse them, they think they are the same thing, but concurrency and parallelism are best thought of as different ideas. You can write beautiful concurrent programs with no parallelism whatsoever and you can also write extremely parallel programs that are not remotely concurrent. Concurrency is a model, parallelism is a result - maybe that's the best way to say it."
I don't think I've been using the terms correctly, because I've read lots of different (and conflicting) usages of them, so I just guessed (Seriously, "Concurrency" does sound like things that are running at the same time). It's good to finally find someone authoritative to nail down the definitions.
So Python can produce concurrent programs, but Cpython cannot do parallelism, for example.
|
|