[GRASS5] GUI for GRASS

Glynn Clements glynn.clements at virgin.net
Thu Oct 17 11:03:57 EDT 2002


Mike Thomas wrote:

> > c) What's the state of Windows support?
> 
> I had a look into this today and found that the Windows GnuStep graphics is
> alpha only but under active development.
> 
> I feel that if you were to choose to use Objective C (much as it appeals),
> you might as well go all the way and use Smalltalk.

That really would be going all the way ;) Using Smalltalk would
probably reduce the developer base to you and me; actually, probably
just you.

> > Even if people can learn it, will they? Or will they turn away as soon
> > as they realise that it's in a language they don't currently
> > understand?
> 
> I have to say that despite it's limitations, C is an excellent language and
> there is plenty of scope for making the current Grass source base more
> maintainable as discussed in other recent threads.

One of the main reasons for C's popularity is its lack of limitations. 
Sure, you might have to write more code (possibly a lot more) than in
a high-level language, but there's very little that C simply won't
allow you to do.

The other main reason is that it's feasible to:

a) interface between C and just about any other language, and

b) link object code compiled on one system (e.g. yours) with object
code compiled on another system (e.g. your OS vendor's).

> As a matter of interest, I wrote from scratch some some simple minded
> Haskell which parses and displays Grass 4 and 5 CELL rasters (plain and RLE)
> but not FCELL, including several variations of colour file and it took only
> a few hundred lines of code, so there is plenty of attraction in using a
> higher level language than C.

FWIW, I did r.out.ppm3 in 76 lines of Haskell (plus ~300 lines of
GreenCard for the relevant libgis bindings). For languages other than
C, I would strongly recommend interfacing to the GRASS libraries
rather than reimplementing them.

It's a nice language for "bespoke" applications, but it's completely
impractical for writing code which is intended to be distributed. The
language and the main libraries are so fragile that a lot of code will
only compile with one specific version of the compiler. Binary
compatibility is totally non-existent.

The same issues apply to a lot of other languages. C++ is
(unsurprisingly) the only one which really comes close, and even that
is problematic.

It works well on Windows, where anything other than 100% binary
compatible with the current version of MSVC is considered an outright
bug. Linux isn't too bad, but even there programs written in C++ are a
lot less portable than those written in C. On commercial Unices, you
need the complete GNU toolchain and libraries, and to have built any
other libraries with those; otherwise you're asking for trouble.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list