I'm studying Ada because I am intrigued by the idea of strict type safety and programming contracts. The idea of "programming for forever" is nice. Anyway, the real question is whether or not Ada has variadic functions. A search on SO suggests that Ada doesn't, and the correct way to do this is with an unconstrained array whose length is determined at runtime.
My question then, isn't how do you do it, but rather what is the convention for doing it correctly?
Additionally, why is it that Ada can perform (what appear to be stack-based) operations like + (e.g. 1+2+3), but it cannot do the same for arguments to a function call?
Is it more idiomatic to not do variadic expressions at all like
Max(1, 2, 3, ..., n)
, or is it simply that you should pass the arguments to it like Args.len=n; Max(Args[])
?
My instinct and what I've gleaned from reading the various Ada books suggests that you shouldn't have unspecific functions due to them being less safe.