开发者

Why does Google app engine recognize URLs, phone numbers and similar as special data types?

Just wondering... why does Google app engine recognize "special" string data types such as Link, Email, PhoneNumber, PostalAddress and such? They seem to be simple text types, and don't even have any helper methods which would, for example, extract host/port information from Link.

What design decision would warrant such a dist开发者_开发问答inction?

And, to continue with a bit more down-to-earth concerns, what benefit do those data types bring to programmers? Why should I use them instead of simple Strings?


As Nick has already answered, when converted to xml with .to_xml(), these properties have different behaviors. Have a look at Gdata docs for more details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜