c********h 发帖数: 330 | 2 不是内行,随便说两句
matlab啥的也是从index 1开始的吧
See this:
S is rare because it is both interactive and has a system for object-
orientation. Designing classes clearly is programming, yet to make S useful
as an interactive data analysis environment, it makes sense that it is a
functional language. In "real" object-oriented programming (OOP) languages
like C++ or Java class and method definitions are tightly bound together,
methods are part of classes (and hence objects). We want incremental and
interactive additions like user-defined methods for pre-defined classes.
These additions can be made at any point in time, even on the fly at the
command line prompt while we analyze a data set. S tries to make a
compromise between object orientation and interactive use, and although
compromises are never optimal with respect to all goals they try to reach,
they often work surprisingly well in practice. |