Article View: comp.lang.misc
Article #909Re: "definition" rather than assignment (lazy evaluation)
From: David Gudeman
Date: Tue, 20 Mar 1990 22:08
Date: Tue, 20 Mar 1990 22:08
40 lines
1852 bytes
1852 bytes
In article <35045@ucbvax.BERKELEY.EDU> othar@ernie.Berkeley.EDU (Othar Hansson) writes: > >Is there any literature on taking assignment/initialization of >variables as "definition", i.e., that > >mytype M = A*B; > >is taken to mean that M is defined as the product of A and B, and that >changes to A will cause M to change? Perhaps there's a >general-purpose language in which this is done (aside from >spreadsheets and special-purpose constraint languages)? Doesn't Pascal allow this? I don't recall the exact syntax, but it seems that function M:mytype begin M := A * B end; declares M as a function of no parameters (invoked without parenthesis) that behaves like your M. Of course, the defining sytax isn't quite as nice. For an interesting developement of the general idea (not related to Pascal) see %A Leslie Lamport %A Fred B. Schneider %T ``A Uniform Approach to Aliasing and Typing'' %J JACM %P 205-216 (Hmm... Looks like I don't have the volume number or date. Sorry. Maybe someone else can give a better reference.) Lamport & Schneider describe a fairly general mechanism (actually a constraint programming language) used as the declaration section of a programming language that is otherwise similar to the Ada/Pascal group of languages. -- David Gudeman Department of Computer Science The University of Arizona gudeman@cs.arizona.edu Tucson, AZ 85721 noao!arizona!gudeman
Technical Details
Message-ID:
<19196@megaron.cs.arizona.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!apple!ames!ig!arizona!gudemanShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!apple!ames!ig!arizona!gudeman From: gudeman@cs.arizona.edu (David Gudeman) Newsgroups: comp.lang.misc Subject: Re: "definition" rather than assignment (lazy evaluation) Message-ID: <19196@megaron.cs.arizona.edu> Date: 20 Mar 90 22:08:10 GMT Organization: U of Arizona CS Dept, Tucson Lines: 40