Should functions have the prefix “interpolate”?
mbostock opened this issue · 1 comments
In d3-shape, I felt it was too verbose to use the prefixes “curve” for curves and “symbol” for symbol types: d3.shape.cardinal
and d3.shape.circle
seem sufficiently specific. If the functions in this repository are similarly scoped by the module name, then isn’t d3.interpolate.rgb
sufficiently specific, too? Saying d3.interpolate.interpolateRgb
seems redundant.
Of course, this assumes that the symbols aren’t flattened on to the d3
namespace, as in d3.interpolateRgb
as they were in 3.x, but I think it will be nice to scope each module’s symbols so that the way we refer to them is the same whether you are using Rollup for a custom bundles or simply concatenating the pre-built bundles.
The probably means d3.interpolate
would need to be renamed d3.interpolate.auto
, unless we decide to have that function be the default export of the module… which I think probably wouldn’t work well? Which then raises a related issue of what to name d3.ease
in d3/d3-ease#8.
Fixed in 0.2.0.