[geos-devel] Assertions in CoordinateArraySequence

Charlie Savage cfis at savagexi.com
Mon Jun 26 14:40:37 EDT 2006


> 
> I think programmers should not be scared by segmentation faults.

Sure.

But this is a different use case then a C/C++ client.

It is programmers working with GEOS from Ruby/Python. In both languages 
array/vetor/list indices are checked and exceptions are raised if they 
are out of bounds.  If we want geos to fit in well in these 
environments, then it would make sense for GEOS to behave the same way.

Also, I don't think there is anything in either language that you can do 
(not including bugs of course or a call to abort) that would cause your 
session to abort.

Anyway - don't know why this did not dawnd on me before - but let's do 
this.  I'll add in the checks in the wrapper since CoordinateSequence 
provides a size method.  That way the api can stay the same but we can 
get bounds checkings for Ruby/Python.

Charlie

> 
> --strk;
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20060626/354f7cee/smime.bin


More information about the geos-devel mailing list