comp.lang.ada
 help / color / mirror / Atom feed
From: Phil Clayton <phil.clayton@lineone.net>
Subject: Re: Some exciting new trends in concurrency and software design
Date: Tue, 21 Jun 2011 06:04:17 -0700 (PDT)
Date: 2011-06-21T06:04:17-07:00	[thread overview]
Message-ID: <bf68620f-b866-43b3-a3ed-0def6d7d7b96@fq4g2000vbb.googlegroups.com> (raw)
In-Reply-To: b66eac0c-c65b-4a9c-b872-dd07841ba3a8@o10g2000prn.googlegroups.com

On Jun 21, 10:36 am, steveh44 <steve_...@yahoo.com> 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



  reply	other threads:[~2011-06-21 13:04 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 10:49 Some exciting new trends in concurrency and software design jonathan
2011-06-20 14:40 ` Georg Bauhaus
2011-06-20 14:48   ` Georg Bauhaus
2011-06-20 23:56   ` jonathan
2011-06-21  9:36     ` steveh44
2011-06-21 13:04       ` Phil Clayton [this message]
2011-06-22  0:37       ` Shark8
2011-06-22  9:45       ` anon
2011-06-29 21:39         ` Robert A Duff
2011-06-30 16:52           ` anon
2011-07-01 18:31             ` Shark8
2011-06-23  9:59       ` Yannick Duchêne (Hibou57)
2011-06-23 10:25         ` Dmitry A. Kazakov
2011-06-23 10:57           ` Yannick Duchêne (Hibou57)
2011-06-23 12:20             ` Dmitry A. Kazakov
2011-06-23 22:17             ` Georg Bauhaus
2011-06-24  1:26               ` Phil Clayton
2011-06-24  1:34                 ` Yannick Duchêne (Hibou57)
2011-06-24 10:41                 ` Georg Bauhaus
2011-06-24  1:27               ` Yannick Duchêne (Hibou57)
2011-06-24 10:32                 ` Georg Bauhaus
2011-06-24 13:45                   ` Yannick Duchêne (Hibou57)
2011-06-21 12:19     ` Dmitry A. Kazakov
2011-06-21 12:14   ` Phil Clayton
2011-06-22  8:39   ` Oliver Kleinke
2011-06-23  2:48     ` Nasser M. Abbasi
2011-06-23  9:23   ` Yannick Duchêne (Hibou57)
2011-06-23 10:03     ` Nasser M. Abbasi
2011-06-23 11:07       ` Yannick Duchêne (Hibou57)
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox