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: a07f3367d7,f3bebae566a54cab X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!fq4g2000vbb.googlegroups.com!not-for-mail From: Phil Clayton Newsgroups: comp.lang.ada Subject: Re: Some exciting new trends in concurrency and software design Date: Tue, 21 Jun 2011 06:04:17 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <8a5765ba-622a-42cd-9886-28ed7cfed31e@s17g2000yqs.googlegroups.com> <4dff5be5$0$6565$9b4e6d93@newsspool3.arcor-online.net> <9b65f3c7-caee-440f-99ed-0b257221ce58@m24g2000yqc.googlegroups.com> NNTP-Posting-Host: 2.24.17.218 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1308661457 25768 127.0.0.1 (21 Jun 2011 13:04:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 21 Jun 2011 13:04:17 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: fq4g2000vbb.googlegroups.com; posting-host=2.24.17.218; posting-account=v7gx3AoAAABfjb9m5b7l_Lt2KVEgQBIe User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:19987 Date: 2011-06-21T06:04:17-07:00 List-Id: On Jun 21, 10:36=A0am, steveh44 wrote: > > FP seems to be good for short programs. I find most languages are good for small programs. (Maybe that was your point! :) The fundamental property of pure functional programming - no destructive assignment, i.e. all value-based - is good for large programs. You know that the value of data is determined only by certain points in your program. You could could achieve a similar effect in Ada by "programming with expressions" though Ada wasn't designed for that and would be more limited. This is particularly suitable for data transformation algorithms. I readily admit that this makes FP fundamentally less suitable for certain classes of algorithm. However, if you do put the effort in to keep programs purely functional, the above property means that it would be much easier to introduce concurrency. A big issue with FP is the complexity of the compliers/interpreters. Predicting what happens at run-time is difficult. Even with Ada (or C etc.), imagine writing a program as an enormous expression by using only functions - how deep does the stack go? > But try to > build a large software system with it, and things > start falling apart quickly. I'm not sure what you mean by "falling apart". FP languages usually have module systems that support large-scale software. In my experience there is one area where FP can quickly fall apart for large systems: efficiency. In practice, there are a handful of things to know and most problems will be avoided. Even so, timing regression tests are important. Phil