From 0de09d7bc5365e4e9549a5ad7b2a8230664380e9 Mon Sep 17 00:00:00 2001 From: Eric Sampson Date: Wed, 8 Sep 2021 21:27:12 -0500 Subject: [PATCH] Add some more reserved type annotations I think it would be useful to get these few more common data types into For the decimal floating types, I referenced [this protobuf discussion](https://github.com/protocolbuffers/protobuf/pull/7039#issuecomment-679083593) and [this](https://github.com/googleapis/googleapis/blob/master/google/type/decimal.proto) I'm not sure what to call out for the currency format, I can't find a standard for that yet. There's a [protobuf money type](https://github.com/googleapis/googleapis/blob/master/google/type/money.proto) that's basically a ISO 4217 currency code plus a decimal number, but I don't really want to invent a suggested money format if there's a real one out there somewhere. For this PR, can we just leave it TBD in order to reserve the type keyword? --- SPEC.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SPEC.md b/SPEC.md index 5512009..fb41b50 100644 --- a/SPEC.md +++ b/SPEC.md @@ -236,16 +236,26 @@ Platform-dependent integer types, both signed and unsigned: * `isize` * `usize` +#### Reserved Type Annotations for Numbers With Decimals: + IEEE 754 floating point numbers, both single (32) and double (64) precision: * `f32` * `f64` +IEEE754-2008 decimal floating point numbers + +* `decimal64` +* `decimal128` + #### Reserved Type Annotations for Strings: * `date-time`: ISO8601 date/time format. * `time`: "Time" section of ISO8601. * `date`: "Date" section of ISO8601. +* `duration`: ISO8601 duration format. +* `decimal`: IEEE754-2008 decimal string format. +* `money`: TBD * `email`: RFC5302 email address. * `idn-email`: RFC6531 internationalized email address. * `hostname`: RFC1132 internet hostname.