试题查看

首页 > 四六级考试 > 试题查看
【单选题】

Programming languagesProgramming languages are how people talk to computers. The computer would be just as happy speaking any language that was unambiguous. The reason we have high level languages is because people can’’t deal with machine language. The point of programming languages is to prevent our poor frail human brains from being overwhelmed by a mass of detail. Architects know that some kinds of design problems are more personal than others. One of the cleanest, most abstract design problems is designing bridges. There your job is largely a matter of spanning a given distance with the least material. The other end of the spectrum is designing chairs.Chair designers have to spend their time thinking about human bodies. Software varies in the same way.Designing algorithms (运算法则) for routing data through a network is a nice, abstract problem, like designing bridges. Whereas designing programming languages is like designing chairs: it’’s all about dealing with human weaknesses.Most of us hate to acknowledge this.Designing systems of great mathematical elegance sounds a lot more appealing to most of us than pandering to human weaknesses.And there is a role for mathematical elegance: some kinds of elegance make programs easier to understan

D、But elegance is not an end in itself.And when I say languages have to be designed to suit human weaknesses, I don’’t mean that languages have to be designed for bad programmers. In fact I think you ought to design for the best programmers, but even the best programmers have limitations. I don’’t think anyone would like programming in a language where all the variables were the letter x with integer subscripts. If you look at the history of programming languages, a lot of the best ones were languages designed for their own authors to use, and a lot of the worst ones were designed for other people to use.When languages are designed for other people, it’’s always a specific group of other people: people not as smart as the language designer. So you get a language that talks down to you.Cobol (计算机通用语言) is the most extreme case, but a lot of languages are pervaded by this spirit. It has nothing to do with how abstract the language is.C、is pretty low-level, but it was designed for its authors to use, and that’’s why hackers like it. The argument for designing languages for bad programmers is that there are more bad programmers than good programmers. That may be so.But those few good programmers write a disproportionately large percentage of the software.I’’m interested in the question, how do you design a language that the very best hackers will like I happen to think this is identical to the question, how do you design a good programming language Give the Programmer as MuchControl as Possible.Many languages (especially the ones designed for other people) have the attitude of a governess: they try to prevent you from doing things that they think aren’’t good for you. I like the opposite approach: give the programmer as much control as you can. When I first learned Lisp (表处理语言), what I liked most about it was that it considered me an equal partner. In the other languages I had learned up till then, there was the language and there was my program, written in the language, and the two were very separate.But in Lisp the functions and macros I wrote were just like those that made up the language itself. I could rewrite the language if I wante
D、It had the same appeal as open-source software.Aim forBrevity. Brevity is underestimated and even scorne
D、But if you look into the hearts of hackers, you’’ll see that they really love it. How many times have you heard hackers speak fondly of how in, say,APL, they could do amazing things with just a couple lines of code I think anything that really smart people really love is worth paying attention to. I think almost anything you can do to make programs shorter is goo
D、There should be lots of library functions;
查看答案解析

参考答案:

正在加载...

答案解析

正在加载...

根据网考网移动考试中心的统计,该试题:

25%的考友选择了A选项

61%的考友选择了B选项

6%的考友选择了C选项

8%的考友选择了D选项

你可能感兴趣的试题

A.Heshouldrelaxforawhile.B.ThemanshouldsA.Hestayedinbed.B.Hetriedtogetoutside.C.ProgramminglanguagesProgramminglanguagesA.Shedoesn’’treallyknowwhattobuy.B.ShedoA.HewassufferingfromahearttroublebecauseA.Thefirstearthquakedidwakehimupbuthedid