(j3.2006) (SC22WG5.5758) RE: RE: Units of measure

Bill Long longb
Thu Jul 7 23:56:10 EDT 2016


On Jul 7, 2016, at 10:40 PM, Van Snyder <Van.Snyder at jpl.nasa.gov> wrote:

> On Fri, 2016-07-08 at 03:38 +0000, Bill Long wrote:
>> On Jul 7, 2016, at 5:36 PM, Van Snyder <van.snyder at jpl.nasa.gov>
>> wrote:
>> 
>>> 
>>> If it's straightforward to add units in C++, why is it
>> insurmountably
>>> difficult in Fortran?
>> 
>> I assume that it can be added to C++ as a class library.    If all of
>> coarrays can be added to C++ without any modifications to the compiler
>> or language spec, it seems likely units could be also.
> 
> Why can't that be done in Fortran?

Because C++ allows you to redefine just about everything, including ( ) and [ ]. C++ also added ?vectors? as a class.   I?m not suggesting that Fortran should become like C++ - the C++ version of coarrays does not perform as well as the Fortran version because the semantics are not known to the C++ optimizer pass.   But it was done for a customer that wanted C++ coarrays badly enough and was willing to pay for all the development work.   

Cheers,
Bill


> 
>> Cheers,
>> Bill
>> 
>> Bill Long
>> longb at cray.com
>> Fortran Technical Support  &                                  voice:
>> 651-605-9024
>> Bioinformatics Software Development                     fax:
>> 651-605-9142
>> Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
>> 
>> 
>> _______________________________________________
>> J3 mailing list
>> J3 at mailman.j3-fortran.org
>> http://mailman.j3-fortran.org/mailman/listinfo/j3
> 
> 
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3

Bill Long                                                                       longb at cray.com
Fortran Technical Support  &                                  voice:  651-605-9024
Bioinformatics Software Development                     fax:  651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101





More information about the J3 mailing list