(j3.2006) Public Comment J32035

Aleksandar Donev donev1
Mon Jul 14 12:49:28 EDT 2008

Michael Ingrassia wrote:
>                                                             08-249
> To: J3
> From: Michael Ingrassia
> Subject: Public Comment J32035
> Date: 2008 July 08
> ----------------------------------------------------------------------
> Commenter's Subject was "IMPURE ELEMENTALs"
> I don't see the value in having IMPURE ELEMENTAL procedures.
> There are no examples in the draft standard and the only
> example in the document describing new features can be
> rewritten without the procedure being ELEMENTAL at all.
OK, so maybe the example is bad. Here are some uses that I find 
important (note that everyone on the committee was pretty much in 
agreement that impure was a good idea and in fact PURE was more or less 
useless and destroyed the utility of ELEMENTAL).

1. It is awfully hard to debug PUREs (no WRITE!)
2. It is awfully hard for PUREs to record something about their 
execution (say a trace in a profiler), even if ordering does not matter
3. There can be no state-dependent ELEMENTALs, such as, notably, 
elemental random number generators.

I am sure there are plenty of other uses. IMO, there is no reason for 
PURE ELEMENTALs, and many reasons for ELEMENTALs. ELEMENTALs should have 
been impure by default and PURE by declaration....but that boat sailed away.


More information about the J3 mailing list