Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!gatech!udel!haven!adm!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.misc Subject: Re: After aliassing -- parallelisation? Message-ID: <7244:Nov1009:14:5490@kramden.acf.nyu.edu> Date: 10 Nov 90 09:14:54 GMT References: <24674:Nov906:50:1890@kramden.acf.nyu.edu> <5499@lanl.gov> Organization: IR Lines: 30 In article <5499@lanl.gov> jlg@lanl.gov (Jim Giles) writes: > From article <24674:Nov906:50:1890@kramden.acf.nyu.edu>, by brnstnd@kramden.acf.nyu.edu (Dan Bernstein): > > One thing that helps detect this situation is pure functions, which > > depend only on their arguments and local variables initialized from > > their arguments. [...] > Finally an agreement! Pretty much the same thing I said. Shall we get into an argument about who posted first? :-) (I did!) > However, > I'm not too sure about your default - shouldn't 'pure' be the > default and 'impure' require the extra declaration? :-) I'm pretty sure that impure is the right default, for various reasons. > > [...] (Clearly subroutines of pure functions must be pure.) > And how do you determine _this_ at compile time? :-) Again, only > half kidding. This is another thing that the loader would be very > good at enforcing. I can _imagine_ arcane schemes involving header > files to do this earlier than load-time, but it again requires that > the headers and the routines themselves actually match. Jim, can you please shed your paranoia about .h files that don't reflect c files? There's absolutely nothing arcane about putting purity into prototypes in header files, and enforcing these restrictions locally. It works perfectly. ---Dan