comp.lang.ada
 help / color / mirror / Atom feed
From: wdl39!mab@ford-wdl1.arpa  (Mark A Biggar)
Subject: Re: how pure are functions?
Date: 7 Apr 92 17:13:35 GMT	[thread overview]
Message-ID: <1992Apr7.171335.13631@wdl.loral.com> (raw)

In article <43123@as0c.sei.cmu.edu> ae@sei.cmu.edu (Arthur Evans) writes:
>    Are they free from internal state?
>No.

I would like to argue that the answer here should be YES.  Ada doesn't 
include a concept similar to C static variables, so any state kept for
an Ada function must be stored in a varible external to the function.
More then likely that variable is only visible in the body of the package
that defines the function and so is invisible to the user of the function,
but strictly the function itself has no "internal" state.  It can be argued
that in Ada only packages and tasks have "internal" state.

--
Mark Biggar
mab@wdl1.wdl.loral.com

             reply	other threads:[~1992-04-07 17:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-04-07 17:13 Mark A Biggar [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-04-07 19:05 how pure are functions? Michal Young
1992-04-09 14:20 P. Singleton
replies disabled

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