Another 'D' proposal (sigh)

Rahul Dhesi dhesi at bsu-cs.UUCP
Mon Feb 29 12:49:38 AEST 1988


In article <1893 at phoenix.Princeton.EDU> rjchen at phoenix.Princeton.EDU (Raymond
Juimong Chen) writes:
>Propose that there be a way to declare "true functions", ie, functions
>whose return values depend on and are solely determined by the arguments
>passed to it.  They also have no side-effects.

Such functions were almost but not quite included in Ada.  They are
discussed in the Rationale for Ada, published as a special SIGPLAN
Notices issue in the early eighties.

Declaring such functions is like using noalias--the compiler cannot
easily confirm that what the programmer claims is really true.  Only
truly global flow analysis will do that, and if you are doing global
flow analysis across separately compiled files, then there's no need
for the programmer to know the difference anyway.
-- 
Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi



More information about the Comp.lang.c mailing list