简体   繁体   English

标准数据类型和功能

[英]Standard data types and functions

Is there any standard and easy way for defining a data type or a function syntax without using a specific programming language? 是否有任何标准且简单的方法来定义数据类型或函数语法,而无需使用特定的编程语言?

I currently know of ASN and XML-Schemas, but I find them too complicated and, sometimes, hard to read. 我目前了解ASN和XML-Schema,但是我发现它们过于复杂,有时很难阅读。 Therefore, I am currently using JSON for data types and JSON-RPC for function syntax, even though I know that none of them is neither very precise nor standard. 因此,尽管我知道它们都不是很精确也不是标准的,但是我目前正在使用JSON来表示数据类型,并使用JSON-RPC来表示函数语法。

There are standard ways (you mention two, and ISO 11404 is another). 有标准的方法(您提到两种,而ISO 11404是另一种方法)。 There are easy ways. 有简单的方法。 If ASN.1 and XSD don't count as easy, then I don't expect you will find any standard and easy ways to do what you like. 如果ASN.1和XSD并不那么容易,那么我不希望您会找到任何标准和简单的方法来完成自己喜欢的事情。

Datatypes are not trivial, and any method of defining datatypes general enough to be widely useful and standardized is going to have to deal with details, and problems, which from many points of view are "obviously" not important or not relevant. 数据类型并非无关紧要,定义任何足以广泛使用和标准化的数据类型的任何方法都必须处理细节和问题,从许多角度来看,这些问题“显然”并不重要或不相关。 The only problem is that the details and problem which are obviously unimportant from any one point of view tend to be central to some other point of view. 唯一的问题是,从任何一个角度看都不重要的细节和问题往往是其他一些角度的中心。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM