Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: DataImpl Arithmetic

Not possible, or at least very impractical. The 'types'
that Kevin and I are discussing are VisAD MathTypes and
there are an infinite number of them that may be
generated by applications dynamically at run time. When
an application opens a file that operation may return
any of those MathTypes, and other operations can generate
arbitrarily complex MathTypes.

Catching MathType mismatch errors at compile time would
limit the compiled code to a finite set of MathTypes.

VisAD does use interfaces extensively. Data, Display,
Field, Cell and DataReferences are a few examples.

Bill

On Fri, 26 May 2006, Eric Davies wrote:

> Just a thought for the future:
>
> Why isn't the error that Kevin experienced a compile time error
> instead of a runtime error?
>
> At a high level, this is a type mismatch error and Java is a very
> strongly typed language, suggesting that its compile time type
> checking system should be usable to enforce such.
> Using interfaces to clarify input arguments would serve as automatic
> documentation as to what the input arguments were actually allowed to be.
> Possible?

==============================================================================
To unsubscribe visad, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690