[geos-devel] GEOS Exceptions
artem at pavlenko.uklinux.net
Mon Apr 18 17:13:55 EDT 2005
>The exceptions thing isn't too egregious. I don't think it's a deal
>breaker with regards to deciding to use GEOS. I'm guessing that many
>users are unaware of the exception interface until one happens to get
>thrown. (Which looks like may have happened to Frank. It's certainly
>what happened to me. And my efforts were more to get more useful
>debugging information than improving GEOS design and implementation.
>Inheriting from std::exception provided a bit more debugging
I see GEOS as a development platform used by developers, and 'c++ style'
currently at large would certainly raise concerns among many (IMHO).
Exceptions are just one example.
>What does MFC have to do with GEOS?
MFC is (was?) (in)famously throwing exceptions by pointer, AFAIK :)
(pre standard C++) - I was joking :(
>Actually, does anyone use MFC? (On purpose?)
I hope not
>Again, though I urged making the aforementioned changes sooner than
>later for pragmatic reasons, the exception interface isn't bad enough
>to scare off people, especially given that most probably won't notice
>the exceptions until they're thrown. (And then, sadly, most of them
>might not know why throwing pointers to exception objects is a badism
>and that there even exists an exception class hierarchy in the ISO
>Standard C++ Library.)
> GEOS happens to fill a much needed niche for a
>C++ geospatial library; some might be so happy that one even exists
>that they might not pay attention to the details.
Yes, of course, but we should have 'the best' as free software often is
in many other areas.
>I've looked at the Boost Spirit parser before and thought it was a
>neat idea. I thought it would be a great way to implement a WKT
>parser. You'd probably get some performance boost. (No pun
>intended!) At the very least the code should (hopefully) be easier to
>read, understand, and maintain.
> Have you done any empirical
>measurement to note any significant performance differences between
>the old and new parsers?
Nope, but I will at some point. Are there any test WKT datasets I could
try? Also I load WKT into my geometry model which is different from GEOS.
Also proper grammar based approach can be a winner for CS WKT?
More information about the geos-devel