yeesian / ArchGDAL.jl

A high level API for GDAL - Geospatial Data Abstraction Library
https://yeesian.github.io/ArchGDAL.jl/stable/
Other
141 stars 27 forks source link

rename layerdefn to getlayerdefn or provide alias #312

Open maxfreu opened 2 years ago

maxfreu commented 2 years ago

This is a really minor issue, but the inconsistency tripped me up; I was looking for the layer definition of a dataset and looked through everything starting with "get", like getfielddefn, getfielddefn etc and found nothing. Is there a reason why "layerdefn" doesnt start with "get"? There are several ways to improve this: provide an alias getlayerdefn -> layerdefn, rename layerdefn (breaking), or remove the get from all other functions or provide an alias forwarding from e.g. getfeaturedefn -> featuredefn.

yeesian commented 2 years ago

Thank you for filing this!

Yeah I think the original reasoning I had was because there isn't a corresponding "setlayerdefn". But on hindsight, I think the consistency of having everything starting with "get" is a helpful discovery mechanism through tab-completion. I'm thinking it's fine to have the alias to keep it non-breaking and decide by v1.0 whether we still want the "non-get" equivalent function names.