问题描述
我知道SEXP上的维基百科页面,并且我知道它代表符号表达.我知道(模糊地)SEXP是指Lisp中的树数据结构的表示法,但是我想知道是什么促使开发人员在C SEXP中调用R对象的数据类型.为什么选择SEXP?
I am aware of the wikipedia page on SEXP, and I know that it stands for symbolic expression. I know (vaguely) SEXP is notation to refer to tree data structures in Lisp, but I want to know what motivated the developers to call the data type of R objects in C SEXP. Why SEXP?
我也很困惑,因为如果R是用C和Fortran制作的,为什么要使用Lisp的符号呢?还是SEXP是更笼统的术语?也许我在这里错过了一些东西.
I am also confused because if R was made in C and Fortran, why would notation from Lisp be used? Or is SEXP a more general term? Maybe I'm missing something here.
推荐答案
R在内部类似于一种具有S兼容语法的Scheme.许多R的内部结构都是从Scheme概念派生的,例如con单元格和词法环境.
R is, internally, kind of like Scheme with an S-compatible syntax. A lot of R's internals derive from Scheme concepts, like cons cells and lexical environments.
早在90年代后期,我就为R开发了一种新的(当时的)序列化格式.请参阅我的荣誉项目论文,其中解释了很多.(该纸张上的电子邮件地址不再有效,因此请不要使用它.)
Back in the late 90s, I worked on a new (at the time) serialisation format for R; see my honours project paper, which explains a lot of this. (The email address on that paper isn't valid any more, so don't use that.)
这篇关于R的C API中的SEXP数据类型到底是什么,为什么要使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!