From: Daniel Martin Date: 2006-07-21T01:14:33+09:00 Subject: Re: Beyond threads? Better concurrency methods? "M. Edward (Ed) Borasky" writes: > anmus wrote: >> My point in posting this message is to ask the Ruby community if it >> is worth thinking about laying some foundations in Ruby 2.0 and YARV >> to elegantly support other methods of expressing >> concurrency. Perhaps this work won't show results until Ruby 3.0, >> but reserving some keywords in the grammar and some hooks in the VM >> may yield dividends in the future. > Uh ... the primitives need to be in the OS for most > "concurrency/parallelism" implementations. Keywords and virtual > machines come after that. And for the primitives to be in the OS, they > need to be in the hardware. The paradigms supported by today's > hardware and operating systems are the paradigms that have a track > record for the most part. Well, the Scala language is hosted on the JVM, so has as its underlying "OS" support only traditional threads. However, because of the abstrction capabilities in the language, they've got a concurrency model similar to Erlang's. I definitely think that the Ruby community should look to see what additional concurrency abstractions can be swiped from elsewhere. > And the stories I'm seeing in the trade press are that "parallel > programming" is no easier today than it was when Gene Amdahl first > published his law. There aren't any silver bullets. "no silver bullets" is different from "this is the best we can do." Structured programming wasn't the silver bullet it was promoted as at first, but I doubt anyone thinks it wasn't an improvement. > Strangely enough, I don't recall ever seeing a *real* programming > language, to be distinguished from academic ones, that ever handled > parallelism in a manner other than as calls to run-time > libraries. Ruby already has that. Erlang doesn't count? True, I don't know of anyone using it besides Erikson, but they use it in real commercial products that other companies pay large amounts of money for. And what about Ada? I seem to remember that someone somewhere was building production systems for some rather extreme operating environments in Ada... Also, I'd object to the idea that java handles parallelism only with calls to the run-time library: the concept of different threads, synchronized blocks, and object monitors is built into the language syntax even if there is some code in a run-time library to implement some aspects of java.lang.Thread.