[ https://issues.apache.org/jira/browse/THRIFT-5587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17547940#comment-17547940 ]
Liu Jiayu commented on THRIFT-5587: ----------------------------------- I agree with that: * for binary use the 16 bytes and byte ordering defined in RFC * for Thrift JSON use the dashed canonical form, no huge use cases for other types, since users may just choose to use string instead ** one caveat is whether to ignore casing (in the RFC it is case insensitive) I'm not sure why 3 is a concern if a library / language does not have built-in support for UUID. But I think the general rule is to default to use stdlib if present, but each language can add a param to tell the generator to generate library dependent code if it is appropriate and needed. A brief survey of uuid support: * Java has JDK support [https://docs.oracle.com/javase/7/docs/api/java/util/UUID.html] since 1.5 (we are currently at Java 8) ** Kotlin follows that * Rust defers to a library [https://docs.rs/uuid/latest/uuid/index.html] although it used to be part of the library * Python3 has built in support [https://docs.python.org/3/library/uuid.html] * JS (node) has multiple UUID libraries, e.g. [https://www.npmjs.com/package/uuid] > Introduce uuid as additional builtin type > ----------------------------------------- > > Key: THRIFT-5587 > URL: https://issues.apache.org/jira/browse/THRIFT-5587 > Project: Thrift > Issue Type: New Feature > Components: Compiler (General) > Reporter: Jens Geyer > Assignee: Jens Geyer > Priority: Major > > I hereby propose to add *{{uuid}}* as an additional built-in basic type. > *Rationale:* > * Uuids (or Guids) are a state of the art and well-understood way to > identitify data entities. > * There is support in next to all languages' runtimes to generate, convert > and store such data. > * Although conversion to and from string or binary is certainly possible, it > is also rather cumbersome. > * A distinct datatype enables us to sent it in the most suitable way across > the wire: JSON=text, Compact=binary > *Remarks* > * -I am open to discuss the term "guid" vs "uuid". Coming from NET platforms > I would tend to guid, but I am open to uuid (or even both) as well. That's > just a detail.- > * If no significant concern is raised, I would move on and implement C#, > Delphi and Haxe bindings (as sub-tasks) myself and leave the rest to the > community. > -- This message was sent by Atlassian Jira (v8.20.7#820007)