Another One Bites the Dust

JPL recently released an update to their awesome SPICE Toolkit (it is now at version N66). The major new feature in this release is the Digital Shape Kernel (DSK) capability to define the shapes of bodies (such as asteroids) via tessellated plate models.

Unfortunately for Fortran users, they also announced that they have decided to reimplement the entire library in C++. SPICELIB is currently written in Fortran 77, which they f2c to provide a C version (which is also callable from IDL, Matlab, and Python, among others). Their reason for this “upgrade” is to provide thread safety and object oriented features. Of course, modern Fortran can be thread safe and object oriented, and upgrading the code to modern standards could be done in a fraction of the time it will take to rewrite everything from scratch in C++. SPICELIB is extremely well-written Fortran 77 code, and is not infested with COMMON blocks, EQUIVALENCE statements, etc. I actually don’t think it would take much effort to modernize it. In addition, Fortran/C interoperability could be employed to easily provide an interface that is callable from C without source transformation.

However, I guess it isn’t meant to be, and the science/engineering community will lose another Fortran code to C++ like many times before, in spite of C++ being a terrible language for scientists and engineers.

See also

Tagged with: , , ,
One comment on “Another One Bites the Dust
  1. I highly agree with you.

    If the goal is to evolve SPICELIB to a modern language other the Fortran 90/95, Fortran 2008 or Fortran 2015 Standard (I won’t mention Fortran 2020 since that is under development at present), then why not port SPICELIB to native Python 3.x? Python is very popular amongst scientific and engineering software developers. The facilities provided by Python allows the developer to concentrate on the program being developed rather that having to worry about both the program being developed and the idiosyncrasies of the language at the same time. Python supports object-oriented, imperative, functional, and procedural programming.

    The upshot of all this is that with Python you can “have your cake and eat too.” My recommendation is that serious consideration should be given to porting SPICELIB to Python.

    Hope this helps.

     

Leave a Reply

Your email address will not be published. Required fields are marked *

*