[GRASS-dev] Can Rast_open_* call G_fatal_error()?

Glynn Clements glynn at gclements.plus.com
Fri Dec 25 01:01:30 EST 2009


Hamish wrote:

> > >  The fix would be simpler if G_open_cell_old() called
> > > G_fatal_error() on errors.
> ... 
> > Can anyone think of a reason *not* to implement this change
> > in 7.0?
> 
> I would expect that anything which wanted to cope with missing
> maps would run G_find_* before deciding to do G_open_*.
> 
> 
> as this is a rasther big nail in the non-persistent use of
> libgis, I'll ask how much of the existing code limiting us to
> single use is by design and how much of it is by oversight?
> Would we be fundamentally altering the design POV with this
> change? (not in a practical sense, but in a design intentention
> sense)

The libraries were designed for use by modules. If they work for other
uses, that's coincidence.

> 400 global variables are not an insurmountable number to slowly
> chip away at IMO, just hit each libary one by one for some
> years..

The downside with trying to generalise the libraries is that it makes
development more complicated for the most common case.

Most of GRASS' "value" is in its modules, and IMHO we should do
whatever we can to reduce the effort involved in writing modules.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list