Here's the problem with that technique, and by the way, a number of programming languages use this, including Lisp.
这会指向元素的值,然后对内存进行切分,关于这种技术有个问题,顺路说下。
Lisp The problem with that technique, while it's very general, is how long does it take me to find the i'th element of the list?
很多编程语言包括,都是用了这种技术,这个问题就是,当数组很大的时候?
Right? If that was the case in that code, then my complexity is no longer log, because I need linear access for each time I've got to go to the list, and it's going to Lisp be much worse than that.
这里的复杂度不再是对数的了,因为每次在列表中,查找需要线性访问,可能还要糟糕,其实,有些编程语言,如。
All right. Now. Some programming languages, primarily Lisp, actually store lists these ways.
就是这么保存列表的,你可能要问为什么。
Now, to my knowledge, most implementations of Python use this way of storing lists, whereas Lisp and Scheme do not.
这正是我希望的,据我所知,Python,的大多数实现,都是用这种方式来存储数组的,而Lisp和Scheme则不是。
I happen to be, and John teases me about this regularly, I'm an old-time Lisp programmer, and that's how I was trained.
我很偶然的,而且John也会常常拿这个来激怒我,我是一个怀旧的Lisp编程者,而那就是我怎么接受训练的。
Scheme And I happen to like Lisp and Scheme, it's a great language when you're trying to deal with problems where you have arbitrarily structured data sets.
而且我很偶然的喜欢上了Lisp和,这些是当你要试图解决你,曾经很武断的设置数据,的地方的问题时很棒的语言。
I love Lisp, but Lisp is certainly in the category of a very weakly typed language.
我爱Lisp,但是Lisp当然,是属于在类型检查比较弱的语言一类。
John Now, you're going to hear John and I go back and forth a lot, well I'm certainly old time, but I'm also an old time Lisp programmer.
现在,你会听到我和,来回的讲好多次,好吧我当然是个老学究,但是我也是一个老lisp程序员。
应用推荐