fishy commented on code in PR #2714:
URL: https://github.com/apache/thrift/pull/2714#discussion_r996171062
##########
test/ConstantsDemo.thrift:
##########
@@ -65,7 +65,9 @@ const map<i32,thing> GEN_WHAT = { 35 : { 'hello' : 325,
'goodbye' : 325352 } }
const set<i32> GEN_SET = [ 235, 235, 53235 ]
-const uuid GEN_UUID = "00000000-4444-CCCC-ffff-0123456789ab"
+// uuids are accepted with or without curly braces
+const uuid GEN_UUID = 00000000-4444-CCCC-ffff-0123456789ab
+const uuid GEN_GUID = {00112233-4455-6677-8899-aaBBccDDeeFF}
Review Comment:
several reasons:
1. This would likely become a very common mistake, that developers would
think that they are supposed to write it in this way: `const uuid GEN_UUID =
"00000000-4444-CCCC-ffff-0123456789ab"`
2. The editor supports for the new syntax will take time to catch up (see
how github is highlighting the syntax right now for an example), which will
further make 1 more likely to happen.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]