JuliaImages has grown over several years through the efforts of many people; now that Julia is itself stable, I anticipate new waves of growth in the coming years. To help ensure its health and vibrancy, I think we need to establish some guidelines that will help give such a large, distributed project a unified feel. To me, step 1 of this process is to develop a naming guide and to rename some of our functions or objects accordingly. The sooner we do this the better.
A naming guide should not be arbitrary, but be based on principles. I propose we use this issue to hash out the principles. Here are a few thoughts to get the discussion rolling:
- maintain consistency with the Julia Style Guide
- operations whose primary goal is to construct something should be nouns:
- when the goal is to create a specific type, use the uppercase constructor name (e.g.,
HOG())
- when the type created depends on the inputs, use a lowercase function (e.g.,
colorview)
- operations that fetch a property or type parameter should be nouns (e.g.,
axes, eltype)
- for functions that compute something or perform an operation, start with a verb (e.g.,
warp)
- "lazy" computations should use the noun form (e.g.,
mappedarray rather than maparray)
More examples of current names that are consistent with these guidelines:
Some examples of current names that would change due to these guidelines:
imfilter violates the "start with a verb" convention. filterarray, mapstencil (inspired by mapwindow) would both be acceptable
imshow->showimage
- while
dilate is good, tophat seems wrong, though I don't immediately have a suggestion as to how to change it
JuliaImages has grown over several years through the efforts of many people; now that Julia is itself stable, I anticipate new waves of growth in the coming years. To help ensure its health and vibrancy, I think we need to establish some guidelines that will help give such a large, distributed project a unified feel. To me, step 1 of this process is to develop a naming guide and to rename some of our functions or objects accordingly. The sooner we do this the better.
A naming guide should not be arbitrary, but be based on principles. I propose we use this issue to hash out the principles. Here are a few thoughts to get the discussion rolling:
HOG())colorview)axes,eltype)warp)mappedarrayrather thanmaparray)More examples of current names that are consistent with these guidelines:
testimage,lineare fine as-is (by the "constructors are nouns" convention)colorviewas a lazy computation is better than an alternative likecombinechannelsbuild_histogramandadjust_histogram(implemented in Addsbuild_histogram(Equalization(),...)Images.jl#761, Addsadjust_histogram(Equalization(),...)Images.jl#762) are better thanimhistandhisteq(which, for now, still remain)Some examples of current names that would change due to these guidelines:
imfilterviolates the "start with a verb" convention.filterarray,mapstencil(inspired bymapwindow) would both be acceptableimshow->showimagedilateis good,tophatseems wrong, though I don't immediately have a suggestion as to how to change it