Why are there 3 different intrinsic functions get_* instead of one single unified one?
I'm wondering why there are three separate intrinsic functions to get information inside a HEAT template (get_param, get_resource & get_attr).
- Why isn't there one function (just get for example) which covers all three use cases?
- What are the benefits of having to address parameters, resources and attributes with different functions?
The only reason I came up with is that you can use one name multiple times (once as a parameter name, once as a resource name and so on)m but I don't think that's a good reason. Can someone enlighten me?
Reasons for one function "get", instead of "get_param, "get_resource" & "get_attribute":
- easier to learn and remember, only one name instead of three
- less error prone, because stuff "just works" instead of having to remember arbitrary differences and their respective function call ( additionally, heat error messages hide the real reason quite well )
- easier to copy&paste from different scripts. I could copy a get_resource call and would only have to add the resource identifer instead of the resource identifier AND the function call
- KISS: Why make things more complicated than they have to be?
What are advantages of this more complicated, more difficult solution?