For example, here’s how much of a thin abstraction value/constant/service/provider are around ‘factory’:
angular.value = (name, value) => angular.factory(name, () => value);angular.constant = (name, value) => angular.factory(name, () => value);angular.service = (name, constructor) => angular.factory(name, () => new value);angular.provider = (name, provider) => angular.factory(name, (new value).$get);
I don’t think having 5 different ways to do fundamentally the same thing, is very useful.
I also think the divide between ‘dependencies available at config time’ and ‘dependencies available at runtime’ is pretty arbitrary and doesn’t provide a whole lot of value. Why can’t I just run configuration code at runtime?