Question:
what is difference between script language and prigramming language?
2006-10-02 22:00:41 UTC
what is difference between script language and prigramming language?
Seven answers:
Sandy
2006-10-02 22:15:48 UTC
http://en.wikipedia.org/wiki/Programming_language



A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. Programming languages, like human languages, are defined through the use of syntactic and semantic rules, to determine structure and meaning respectively.



Programming languages are used to facilitate communication about the task of organizing and manipulating information, and to express algorithms precisely. Some authors restrict the term "programming language" to those languages that can express all possible algorithms;[1] sometimes the term "computer language" is used for more limited artificial languages.



*****

http://en.wikipedia.org/wiki/Scripting_languages



Computer languages are created for varying purposes and tasks — different kinds and styles of programming. One common programming task is known as scripting, or connecting diverse pre-existing components to accomplish a new related task. Those languages which are suited to scripting are typically called scripting languages. Many languages for this purpose have common properties: they favor rapid development over efficiency of execution; they are often implemented with interpreters rather than compilers; and they are strong at communicating with program components written in other languages.



Many scripting languages emerged as tools for executing one-off tasks, particularly in system administration. One way of looking at scripts is as "glue" that puts several components together; thus they are widely used for creating graphical user interfaces or executing a series of commands that might otherwise have to be entered interactively through keyboard at the command prompt. The operating system usually offers some type of scripting language by default, widely known as a shell script language.
H@ri
2006-10-03 03:53:39 UTC
It(Script) Binds with HTML Tag

where as Programing language has not bind with HTML tag.

The end result only comes to HTML page interms of Programing language where as Script Language manipulate the Conternt in the HTML.Like MouseOverEvent,OnClickEvent
liketoaskq
2006-10-02 22:44:53 UTC
To create an application like Excel you need programming language. But to write macros you need scripting like VBA. To put in simple words, you can customise an application with scripting without the hassle of buying the complete compiler and IDE etc. A mini compiler is already integrated with the application.
taskr36
2006-10-02 22:03:37 UTC
script language deals primarily with making things look a certain way, like the way HTML makes web pages look how you want them too. Programming languages are much more complex and deal with more variables. That is why web pages are small and programs are huge.
mcklassic
2006-10-02 22:05:00 UTC
As far as HOW MUCH you need to learn to do them successfully, not much...as far as content that your learning, it is too complicated to explain the differences, just look it up :) I program C++, Java, J# & BASIC & HTML...off notepads! Oh yeah, Notepad kids! What up! J/k, but seriously, the differences are complex & take WAY too long to explain



Trust me: NICE web pages are NOT small...they can get large just like self sufficient programs...
2016-10-02 01:16:20 UTC
coaching is stable, because of the fact it teaches you the thank you to income, the thank you to self-discipline your thoughts. understanding for a Christian is understanding the be conscious, understanding your God, His nature, His will, His outlook on issues. expertise is finding at issues from God's attitude and putting them into action. understanding is superb, yet too lots of it may puff you up in case you do not counteract it with fruit of the Spirit. Ever be attentive to a individual who's very knowledgeable, yet has no temperance and no love? Their understanding is only approximately ineffective interior the long-term. yet expertise? you detect that and your soul shall stay, because of the fact once you detect expertise, you detect the way God Himself looks at a concern. Proverbs 3: with the help of expertise the Lord laid the earth’s foundations, with the help of understanding he set the heavens in place; with the help of his understanding the watery depths have been divided, and the clouds enable drop the dew.
2006-10-02 22:19:51 UTC
2 System programming languages

In order to understand the differences between scripting languages and system programming languages, it is important to understand how system programming languages evolved. System programming languages were introduced as an alternative to assembly languages. In assembly languages, virtually every aspect of the machine is reflected in the program. Each statement represents a single machine instruction and programmers must deal with low-level details such as register allocation and procedure calling sequences. As a result, it is difficult to write and maintain large programs in assembly language.

By the late 1950's higher level languages such as Lisp, Fortran, and Algol began to appear. In these languages statements no longer correspond exactly to machine instructions; a compiler translates each statement in the source program into a sequence of binary instructions. Over time a series of system programming languages evolved from Algol, including such languages as PL/1, Pascal, C, C++, and Java. System programming languages are less efficient then assembly languages but they allow applications to be developed much more quickly. As a result, they have almost completely replaced assembly languages for the development of large applications.



System programming languages differ from assembly languages in two ways: they are higher level and they are strongly typed. The term "higher level" means that many details are handled automatically so that programmers can write less code to get the same job done. For example:





Register allocation is handled by the compiler so that programmers need not write code to move information between registers and memory.

Procedure calling sequences are generated automatically: programmers need not worry about moving arguments to and from the call stack.

Programmers can use simple keywords such as while and if for control structures; the compiler generates all the detailed instructions to implement the control structures.

On average, each line of code in a system programming language translates to about five machine instructions, compared to one instruction per line in assembly language (in an informal analysis of eight C files written by five different people, I found that the ratio ranged from about 3 to 7 instructions per line[7]; in a study of numerous languages Capers Jones found that for a given task, assembly languages require about 3-6 times as many lines of code as system programming languages[3]). Programmers can write roughly the same number of lines of code per year regardless of language[1], so system programming languages allow applications to be written much more quickly than assembly language.

The second difference between assembly language and system programming languages is typing. I use the term "typing" to refer to the degree to which the meaning of information is specified in advance of its use. In a strongly typed language the programmer declares how each piece of information will be used and the language prevents the information from being used in any other way. In a weakly typed language there are no a priori restrictions on how information can be used: the meaning of information is determined solely by the way it is used, not by any initial promises.1



Modern computers are fundamentally typeless: any word in memory can hold any kind of value, such as an integer, a floating-point number, a pointer, or an instruction. The meaning of a value is determined by how it is used: if the program counter points at a word of memory then it is treated as an instruction; if a word is referenced by an integer add instruction then it is treated as an integer; and so on. The same word can be used in different ways at different times.



In contrast, today's system programming languages are strongly typed. For example:





Each variable in a system programming language must be declared with a particular type such as integer or pointer to string, and it must be used in ways that are appropriate for the type.

Data and code are totally segregated: it is difficult or impossible to create new code on the fly.

Variables can be collected into structures or objects with well-defined substructure and procedures or methods to manipulate them; an object of one type cannot be used where an object of a different type is expected.

Typing has several advantages. First, it makes large programs more manageable by clarifying how things are used and differentiating between things that must be treated differently. Second, compilers can use type information to detect certain kinds of errors, such as an attempt to use a floating-point value as a pointer. Third, typing improves performance by allowing compilers to generate specialized code. For example, if a compiler knows that a variable always holds an integer value then it can generate integer instructions to manipulate the variable; if the compiler doesn't know the type of a variable then it must generate additional instructions to check the variable's type at runtime.

To summarize, system programming languages are designed to handle the same tasks as assembly languages, namely creating applications from scratch. System programming languages are higher level and much more strongly typed than assembly languages. This allows applications to be created more rapidly and managed more easily with only a slight loss in performance. See Figure 1 for a graphical comparison of assembly language and several system programming languages.







3 Scripting languages

Scripting languages such as Perl[9], Python[4], Rexx[6], Tcl[8], Visual Basic, and the Unix shells represent a very different style of programming than system programming languages. Scripting languages assume that there already exists a collection of useful components written in other languages. Scripting languages aren't intended for writing applications from scratch; they are intended primarily for plugging together components. For example, Tcl and Visual Basic can be used to arrange collections of user interface controls on the screen, and Unix shell scripts are used to assemble filter programs into pipelines. Scripting languages are often used to extend the features of components but they are rarely used for complex algorithms and data structures; features like these are usually provided by the components. Scripting languages are sometimes referred to as glue languages or system integration languages.

In order to simplify the task of connecting components, scripting languages tend to be typeless: all things look and behave the same so that they are interchangeable. For example, in Tcl or Visual Basic a variable can hold a string one moment and an integer the next. Code and data are often interchangeable, so that a program can write another program and then execute it on the fly. Scripting languages are often string-oriented, since this provides a uniform representation for many different things.



A typeless language makes it much easier to hook together components. There are no a priori restrictions on how things can be used, and all components and values are represented in a uniform fashion. Thus any component or value can be used in any situation; components designed for one purpose can be used for totally different purposes never foreseen by the designer. For example, in the Unix shells, all filter programs read a stream of bytes from an input and write a string of bytes to an output; any two programs can be connected together by attaching the output of one program to the input of the other. The following shell command stacks three filters together to count the number of lines in the selection that contain the word "scripting":





select | grep scripting | wc



The select program reads the text that is currently selected on the display and prints it on its output; the grep program reads its input and prints on its output the lines containing "scripting"; the wc program counts the number of lines on its input. Each of these programs can be used in numerous other situations to perform different tasks.

The strongly typed nature of system programming languages discourages reuse. Typing encourages programmers to create a variety of incompatible interfaces ("interfaces are good; more interfaces are better"). Each interface requires objects of specific types and the compiler prevents any other types of objects from being used with the interface, even if that would be useful. In order to use a new object with an existing interface, conversion code must be written to translate between the type of the object and the type expected by the interface. This in turn requires recompiling part or all of the application, which isn't possible in the common case where the application is distributed in binary form.



To see the advantages of a typeless language, consider the following Tcl command:





button .b -text Hello! -font {Times 16} -command {puts hello}



This command creates a new button control that displays a text string in a 16-point Times font and prints a short message when the user clicks on the control. It mixes six different types of things in a single statement: a command name (button), a button control (.b), property names (-text, -font, and -command), simple strings (Hello! and hello), a font name (Times 16) that includes a typeface name (Times) and a size in points (16), and a Tcl script (puts hello). Tcl represents all of these things uniformly with strings. In this example the properties may be specified in any order and unspecified properties are given default values; more than 20 properties were left unspecified in the example.

The same example requires 7 lines of code in two methods when implemented in Java. With C++ and Microsoft Foundation Classes, it requires about 25 lines of code in three procedures (see [7] for the code for these examples). Just setting the font requires several lines of code in Microsoft Foundation Classes:





CFont *fontPtr = new CFont();

fontPtr->CreateFont(16, 0, 0,0,700, 0, 0, 0, ANSI_CHARSET,

OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,

DEFAULT_PITCH|FF_DONTCARE, "Times New Roman");

buttonPtr->SetFont(fontPtr);



Much of this code is a consequence of the strong typing. In order to set the font of a button, its SetFont method must be invoked, but this method must be passed a pointer to a CFont object. This in turn requires a new object to be declared and initialized. In order to initialize the CFont object its CreateFont method must be invoked, but CreateFont has a rigid interface that requires 14 different arguments to be specified. In Tcl, the essential characteristics of the font (typeface Times, size 16 points) can be used immediately with no declarations or conversions. Furthermore, Tcl allows the behavior for the button to be included directly in the command that creates the button, while C++ and Java require it to be placed in a separately declared method.

(In practice, a trivial example like this would probably be handled with a graphical development environment that hides the complexity of the underlying language: the user enters property values in a form and the development environment outputs the code. However, in more complex situations such as conditional assignment of property values or interfaces generated programmatically, the developer must write code in the underlying language.)



It might seem that the typeless nature of scripting languages could allow errors to go undetected, but in practice scripting languages are just as safe as system programming languages. For example, an error will occur if the font size specified for the button example above is a non-integer string such as xyz. The difference is that scripting languages do their error checking at the last possible moment, when a value is used. Strong typing allows errors to be detected at compile-time, so the cost of run-time checks is avoided. However, the price to be paid for this efficiency is restrictions on how information can be used: this results in more code and less flexible programs.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...