Martin Davis wrote:
> JTS defines a concept of a null Envelope object state for precisely
> this reason.
> 
> The reason for returning a null Envelope object rather than null is
> that in my experience most callers of getEnvelopeInternal want
> something they can test against.  If null was returned calling code
> would need a special check for every call.
> 
> This is the same reason that empty Geometries are defined.  Often it
> simplifies code if there is something there, rather than null.

I understand it.
This rationale sounds good.

strk:
So, I'd cancel my agreement to return null pointer.
Martin's explanation is clear and I'd stick to operate on empty
Geometries rather than null pointers.
What do you think?

Cheers
-- 
Mateusz Łoskot
http://mateusz.loskot.net
_______________________________________________
geos-devel mailing list
geos-devel@geos.refractions.net
http://geos.refractions.net/mailman/listinfo/geos-devel

Reply via email to