> We generally consider physical lengths to be in the domain of Reals, usually defined along a particular path or dimension. This is closed under subtraction
This is wrong. We consider physical lengths to be nonnegative real numbers, which are not closed under subtraction. Trying to use negative numbers for physical lengths will get you very funny looks.
> It's very generous to call a set of arguments to variadic function a "vector" at all
It's not an element of a mathematical vector space, but it's a vector in the common sense of an ordered collection of values. The other examples I gave you, like (int, int, int), are vectors even in the algebraic sense.
> I would sure like it if function signatures like that were impossible :)
That was the signature for Java's String.format, the equivalent of C's sprintf (which, like String.format, maps an infinite-dimensional vector to a single string). If you really didn't understand this, you can tell that the return type from String.format is a scalar by looking at the return type declaration, "String". To understand the precise mapping, I can only recommend you read the javadoc.
>> But somehow string formatting is wildly popular.
> Lots of mathematically ill-defined things are wildly popular.
I'm willing to grant this, but it's certainly not relevant to string formatting.
>> Hash tables aren't closed under access.
> Not sure what you mean by this.
Accessing a hash table isn't guaranteed to get you another hash table. Just like subtracting two positive numbers won't necessarily get you a positive number.
Subtracting two length doesn't give you a length, it gives you a difference of length, which can be any real number.
So by analogy subtracting two unsigned ints should give you a signed int by default (unless you specifically ask for the unsafe unsigned int, and then it's on you to make sure the preconditions are met).
This is wrong. We consider physical lengths to be nonnegative real numbers, which are not closed under subtraction. Trying to use negative numbers for physical lengths will get you very funny looks.
> It's very generous to call a set of arguments to variadic function a "vector" at all
It's not an element of a mathematical vector space, but it's a vector in the common sense of an ordered collection of values. The other examples I gave you, like (int, int, int), are vectors even in the algebraic sense.
> I would sure like it if function signatures like that were impossible :)
That was the signature for Java's String.format, the equivalent of C's sprintf (which, like String.format, maps an infinite-dimensional vector to a single string). If you really didn't understand this, you can tell that the return type from String.format is a scalar by looking at the return type declaration, "String". To understand the precise mapping, I can only recommend you read the javadoc.
>> But somehow string formatting is wildly popular.
> Lots of mathematically ill-defined things are wildly popular.
I'm willing to grant this, but it's certainly not relevant to string formatting.
>> Hash tables aren't closed under access.
> Not sure what you mean by this.
Accessing a hash table isn't guaranteed to get you another hash table. Just like subtracting two positive numbers won't necessarily get you a positive number.