>>1192
>in addition to being unclear (what's the purpose?)
Serialization. It's either JSON, XML, ASN.1, Protocol Buffers, etc, etc.
>[This] changes the question to one where the language arbitrarily chose something out of the things that serve the purpose.
Yep.
>There is no "different arithmetic" serving the same purpose as standard arithmetic
I dunno… Why not define subtraction of natural numbers so sub(x,y) fails if y is greater than x? What's the correct way?
Why not have Naturals as well as Integers?
When inducing a protocol from types (as opposed to specifying bits or using some doodoo like Protocol Buffers or JSON), this is decent gain, because now the protocol specifies exactly what's acceptable and we don't need some comment (or clause in a spec) which everyone ignores, and we also don't need a bunch of runtime checks everywhere. Of course now we're more likely to need conversion from Natural to Integer or whatever once in a while but I feel it's more explicit and the other way around just lets lazy programmers not care about the edge cases.
We can have whatever types we want:
Integer: …-3,-2,-1,0,1,2,3…
Natural: 0,1,2,3…
Positive: 1,2,3,4…
Rational: +/- …1/1,2/1,3/1,4/1,1/2,2/2,3/2,4/2…
>Again, I get the intense feeling that you say "number" and "number type" but mean something completely different like "number syntax" or "special handling for numbers"
When talking about existing PLs, I mean the whole part of the PL dealing with numbers - the syntax, the implementation, the type the language provides to the user (i.e, ->int<- x = 3). When talking about my language, I just mean the user-defined type, and I guess whatever functions he defines on it.
>if there is no standardized representation I don't see how you'd exchangePost too long. Click here to view the full text.