"true" functions (Re: Another 'D' proposal (sigh))

Bob Larson blarson at skat.usc.edu
Mon Feb 29 14:00:28 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.

SAIL (Stanford Artificial Intelegence Language) has this.  It allows
much more powerful constant expressions besides the better code
generated.

>	3. be calculated at any time provided the arguments are known.

The "any time" of course should included the compile/link process.
Unfortunatly, most current compiler/linkers can't handle conversions of
function calls to constants and subsequent optimization...

(SAIL has one major problem: it is closely tied to an obsolete 36 bit
arcitecture.  It has a lot of features I would like to see made more
common including true strings, case expressions, concurency, etc.)
-- 
Bob Larson	Arpa: Blarson at Ecla.Usc.Edu	blarson at skat.usc.edu
Uucp: {sdcrdcf,cit-vax}!oberon!skat!blarson
Prime mailing list:	info-prime-request%fns1 at ecla.usc.edu
			oberon!fns1!info-prime-request



More information about the Comp.lang.c mailing list