From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1c8c283347cf0236 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 22 Apr 2011 21:20:44 -0500 From: Peter C. Chapin Newsgroups: comp.lang.ada Subject: Re: If not Ada, what else... Date: Fri, 22 Apr 2011 22:20:31 -0400 Organization: Vermont Technical College Message-ID: <3bd4r61fto439q8a1qf78gsllar1pmkqtv@4ax.com> References: <87r58vmmo0.fsf@mid.deneb.enyo.de> <64e02334-d9cf-498c-8870-7b574533cdeb@i39g2000prd.googlegroups.com> X-Newsreader: Forte Agent 6.00/32.1186 trialware MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-IHD40iCWIV21aJDcKTVSWdxI2pJgYQihRuldl0pewB4S5Oh2YodSoF4iCC605U38Irye3J+VBEaXHgO!0ZBZoicMl+Kod9xoTOdwRESbeAkN/YjDwW0Xk3QcjLPznlNIlYVNpEh602LGttuL2zQXvB8= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2905 Xref: g2news1.google.com comp.lang.ada:18998 Date: 2011-04-22T22:20:31-04:00 List-Id: On Fri, 22 Apr 2011 10:49:41 -0700 (PDT), Brad Cantrell wrote: >If you really want to compare Ada with functional languages, you >should try Erlang. The promise of functional languages are in non- >mutable variables and functions with no side effects which qualifies a >language as being a "pure functional" language. Erlang is almost a >subset of Haskell, the only difference is that its dynamically typed. >It relies on pattern matching with guards much as Haskell does. But >what sets Erlang apart from Haskell is that threading is built into >the language so that it has practical value in dealing with the >outside world. Erlang is cool but I have to put in a pitch for Scala here. Scala comes with an "actors" library that is modeled after Erlang's approach to concurrency (message passing). However, like Ada, Scala is statically typed. The upcoming 2.9 release of Scala will also include parallel collections that can be iterated over with parallel for loops (and, in fact, support many other parallelized operations). This is accomplished without adding any syntax to the language. Scala's native syntax is extensible enough as is. For example: // This method operates on a sequence of type T. def someMethod[T](data: Seq[T]) = { for (item <- data par) { // Parallelized loop. Iterations are spread over multiple cores. } } In the above code 'par' is actually a method being applied to 'data.' The for loop ends up being parallelized not because the compiler treats it in a special way, but rather because of the behavior of the 'par' method. Peter