Hacker News new | past | comments | ask | show | jobs | submit login

The issue is code readability while dealing with memory efficient arrays of DoubleArrays, which are used by geojson to represent geometries.

You are right about the function call :-). Actually you can also do fun PointCoordinates.f() {...}.

The reason I have function calls with latitude and longitude in there as equivalents for their point coordinate variants is just convenience. If you have some other library using its own point representation, having to first convert to my representation before you can use my functions is a bit verbose. And of course, people into OO programming usually get a bit carried away reinventing their own Point classes. It's one of the reasons I stayed away from using object hierarchies in this library.

The geojson classes are an exception to this and were actually bolted on fairly recently so I can support geojson compatible serialization/deserialization.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: