Here's the problem with that technique, and by the way, a number of programming languages use this, including Lisp.
这会指向元素的值,然后对内存进行切分,关于这种技术有个问题,顺路说下。
A couple of really interesting consequences of that, by the way, one of them is, it says, anything you can do in one programming language you can do in another programming language.
一些真正有趣的后果是,顺便说一句,其中之一是,它说你在一种编程语言中,能做的事情,在另一种语言中也能做。
Thank you. Nice catch too by the way. All right, so now that you can see that I can screw up programming, which I just did.
但是我们在半路中发现并修复了,谢谢你,那么我们做了什么呢?,我们现在学习了收集东西的一种方式。
It's the same computation. But this is a nice way of writing it, often called defensive programming.
这跟原来的计算过程没什么不同,但这是写代码的更优秀的一种方式。
And today nobody advocates a programming language that does not support it in some sort of way.
今天没有人会推荐一种,不支持面向对象编程的语言。
It's not true, by the way, of all programming languages. In fact, Professor Guttag already talked about that, in some languages lists take a time linear with the length to get to it.
顺便说一句这在大部分,编程语言中做不到,实际上Guttag教授已经说过这一点了,在一些语言中取得数组,要花费时间是线性长度的。
Meaning, we're going to try to help you with how to develop good programming style, but you need to write in a way in which it is going to be easy for you to spot the places that cause those semantic bugs to occur.
这意味着我们会帮助你,形成良好的编程风格,但是你需要去以一种,容易发现,程序中,容易发生语义bug的地方的方式去写代码。
应用推荐