Computer Science. The English Language Perspective - Беликова (1176925), страница 13
Текст из файла (страница 13)
An application generator lets youdescribe a series of screen and database structures, and thenautomatically creates the low-level commands needed toimplement the program. Similarly, spreadsheets, desktoppublishing software, simulation packages and so on haveextensive facilities for abstract programming.It should be obvious that programs in an abstract, nonimperative language cannot hope to be as efficient as handcoded C programs. Non-imperative languages are to bepreferred whenever a software system must search throughlarge amounts of data, or solve problems whose solution cannotbe precisely described. Examples are: language processing(translation, style checking), pattern matching (vision, genetics)and process optimization (scheduling).
As implementationtechniques improve and as it becomes ever more difficult todevelop reliable software systems in ordinary languages, theselanguages will become more widespread.A functional, or applicative, language is one in which theprimary means of computation is applying functions to givenparameters. Programming can be done in a functional languagewithout the kind of variables that are used in imperativelanguages, without assignment statements, and withoutiteration. This makes the syntax and the semantics of thefunctional languages simple compared to that of the imperativelanguages.Programs in functional languages can be divided intoconcurrent parts dynamically, by the execution system, makingthe process highly adaptable to the hardware on which it isrunning. The closeness of functional programming tomathematics, while resulting in conciseness and elegance, mayin fact make functional programming languages less accessibleto many programmers.76The most prominent among these languages are: LISP,COMMON LISP, and Scheme, which is widely used to teachfunctional programming.In the early days of programming several very influentiallanguages were designed and implemented that had onecharacteristic in common: the languages each had a preferreddata structure and an extensive set of operations for thepreferred structure.
These languages made it possible to createsophisticated programs that were otherwise difficult to write inlanguages such as FORTRAN that simply manipulatedcomputer words.Data-oriented languages are somewhat less popular than theyonce were, partly because by using object-oriented techniques itis possible to embed such data-oriented operations intoordinary languages like C++ and Ada, but also because ofcompetition from newer language concepts like functional andlogic programming. Nevertheless, the languages are technicallyinteresting and quite practical for the programming tasks forwhich they were designed.Object-oriented programming (OOP) is a method ofstructuring programs by identifying real world or other objects,and then writing modules each of which contains all the dataand executable statements needed to represent one class ofobjects.
Within such a module, there is a clear distinctionbetween the abstract properties of the class which are exportedfor use by other objects, and the implementation which ishidden so that it can be modified without affecting the rest ofthe system.C++ showed that it was possible to implement the entiremachinery of OOP in a manner that is consistent with staticallocation and type-checking, and with fixed overhead fordispatching; the dynamic requirements of OOP are used only asneeded.
Ada 95 based its support for OOP on ideas similar tothose found in C++.77The latest step in the evolution of software development isobject-oriented design. Object-oriented methodology beginswith data abstraction, and adds inheritance and dynamicmethod binding.
Inheritance greatly enhances the potentialreuse of existing software, providing the possibility ofsignificant increases in software development productivity.This is an important factor in the increase in the popularity ofobject-oriented languages, such as Smalltalk, Ada 95, Java, andC++.Another kind of language, the visual language, formssubcategory of the imperative languages. The most popularvisual language is Visual BASIC, which is now being replacedby Visual BASIC.NET.
These languages include capabilities fordrag-and-drop generation of code segments. The characterizingfeature of a visual language provides a simple way to generategraphical user interfaces to programs.Languages used for logic programming are called logicprogramming languages, or declarative languages, becauseprograms written in them consist of declarations rather thanassignments and control flow statements. These declarationsare actually statements in symbolic logic.Declarative semantics is considerably simpler than thesemantics of the imperative languages.Programming in a logic programming language isnonprocedural. Programs in such languages do not state exactlyhow a result is to be computed but rather describe the form ofthe result. The difference is that we assume the computersystem can somehow determine how the result is to becomputed.
What is needed to provide this capability for logicprogramming languages is a concise means of supplying thecomputer with both the relevant information and a method ofinference for computing the desired result.Logic programming in general and Prolog language inparticular are a natural match to the needs of implementing anRDBMS: only a single language is required, the deductivecapability is built in.78Prolog can be used to construct expert systems. It can easilyfulfill the basic needs of expert systems, using resolution as thebasis for query processing, using its ability to add facts andrules to provide the learning capability, and using its tracefacility to inform the user of the ‘reasoning’ behind a givenresult.In recent years, a new category of languages has emerged, amark-up/programming hybrid languages.
Mark-up languages,including the most widely used mark-up language, XHTML,are not programming languages. They are used to specify thelayout of information in Web documents.Web Languages are used for creating and editing pages on theWeb. They can do anything from putting plain text onWebpage, to accessing and retrieving data from a database andvary greatly in terms of power and complexity. HTML (Hyper Text Markup Language) is the corelanguage of the World Wide Web that is used to definethe structure and layout of Web pages by using varioustags and attributes. Although a fundamental languageof the Web, HTML is static - content created with it doesnot change. HML (Extensible Markup Language) works like HTML,but unlike HTML, allows for custom tags that aredefined by programmers. XML allows for thetransmission of data between applications andorganizations through the use of its custom tags. Javascript is developed by Netscape used to providedynamic and interactive content on Webpages.
WithJavascript it is possible to communicate with HTML,create animations, create calculators, validate forms, andmore. Javascript is often confused with Java, but theyare two different languages.79PHP (Hypertext Preprocessor (it's a recursive acronym))is a powerful language used for many tasks such as dataencryption, database access, and form validation.
PHPwas originally created in 1994 by Rasmus Lerdorf.Java is a powerful and flexible language created by SunMicroSystems that can be used to create applets (aprogram that is executed from within another program)that run inside Webpages as well as softwareapplications. Things you can do with Java includeinteracting with the user, creating graphical programs,reading from files, and more. Java is often confused withJavascript, but they are two different languages.Software languages are used for creating executable programs.They can create anything from simple console programs thatprint some text to the screen to entire operating systems andvary greatly in terms of power and complexity. C is an advanced programming language used forsoftware application development.
It has proven itself tobe able to be used for various software applications suchas business programs, engineering programs, and evengames. C++ is a descendant of the C language. The differencebetween the two languages is that C++ is objectoriented. C++ is a very popular language for graphicalapplications. Visual Basic is a language developed by Microsoftbased on the BASIC language. Visual Basic is used forcreating Windows applications. The VBScript language(also developed by Microsoft) is based on Visual Basic.Within the area of 'Quantum Computing' a new field ofresearch has emerged: designing and realizing experimental'Quantum Programming Languages' (QPLs) complement theresearch fields of 'computational models' (gate model, one-way80quantum computer, quantum cellular automata), 'errorcorrection' and 'quantum algorithms'.From a pragmatical point of view QPLs are formal systems,which serve as a means to control the execution of programs ona quantum computer or on a classical computer simulating aquantum computer.
A possible model describing this scenariois Knill's QRAM model, which is based on the idea that theprogram proper runs on a classical computer which controls thequantum computer, i.e. which controls a device driving aquantum experiment.QPLs can also be classified into the traditional categories offunctional and imperative/object-oriented programminglanguages.Just as with classical programming languages there are manymore aspects on QPLs which are a matter of debate.
A QPLcould be designed as a completely new language or as anextension of an existing classical language. The extension itselfcould either be embedded into the classical language or berealized in form of a library.One of the problems which language designers face is therelatively small number of quantum algorithms which couldhelp to demonstrate the expressiveness of their language.Another open problem is the construction of high levelstructures analogous to the structures, which are nowadayscommon in all modern programming languages such asmodules, abstract data types, etc.