(j3.2006) operator(==) and operator(/=)
Tom Clune
Thomas.L.Clune
Wed Apr 13 15:58:10 EDT 2016
I of course cannot comment on the ?why? as it was before my time. But I will make 2 observations. (1) There are other languages that provide pretty much the same approach requiring the user to define both procedures, and (2) I think there are formal systems in the law of the excluded middle does not apply. (E.g. Godel incompleteness work.) Not sure any of those have relevance to implementations that are likely to be used in fortran.
> On Apr 13, 2016, at 3:23 PM, Van Snyder <Van.Snyder at jpl.nasa.gov> wrote:
>
> I was a bit surprised to discover that (apparently) defining
> operator(==) does not define operator(/=), and that a scoping unit is
> not prohibited from having access to both.
>
> Was there a conscious reason we did not (indirectly) require
>
> ( A == B ) .eqv. ( .not. ( A /= B ) )
>
> by specifying that only a definition of operator(==) or operator(/=) can
> be accessible in a scoping unit, and the other one is automatically
> defined?
>
> Or was this just an oversight?
>
> It's too late to change it now, but I'm still curious whether there was
> a thought process involved.
>
> One might argue that also
>
> ( A <= B ) .eqv. ( .not. ( A > B ) )
>
> etc., but perhaps that's too much thinking to do before breakfast.
>
> One might argue that 7.1.5.4.2p1 (in 10-007r2) gives license to replace
> ( A == B ) with ( .not. ( A /= B ) ), and 7.1.5.5.2 gives license to
> replace ( A <= B ) with ( .not. ( A > B ) ).
>
> So is it really necessary for a scoping unit to have access to both
> operator(==) and operator(/=)?
>
>
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
Thomas Clune, Ph. D. <Thomas.L.Clune at nasa.gov>
Software Infrastructure Team Lead
Global Modeling and Assimilation Office, Code 610.1
NASA GSFC
MS 610.1 B33-C128
Greenbelt, MD 20771
301-286-4635
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20160413/ce5fbd72/attachment-0002.html
More information about the J3
mailing list