CSC/ECE 517 Fall 2009/wiki1b 11 al: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
=Static Vs Dynamic Object Oriented Languages from the perspective of Performance=
==Overview==
==Overview==


Static languages are known for its conservative[http://en.wikipedia.org/wiki/Type_system] approach to language processing, making most typing decisions at compile time itself thereby allowing the compilers to optimize on the byte code generated and provide better type-error checking. Thus, performance is tweaked in these languages. Dynamic languages, on the other hand, attempt to improve  the productivity of the average developer,  allowing him more flexibility in terms of type checking and so, delay most typing decisions as much as feasible. Thus they sacrifice slightly on performance, and allow for more expressiveness and freedom.
Static languages are known for its conservative approach to language processing, making most typing decisions at compile time itself thereby allowing the compilers to optimize on the byte code generated and provide better type-error checking. Thus, performance is tweaked in these languages. Dynamic languages, on the other hand, attempt to improve  the productivity of the average developer,  allowing him more flexibility in terms of type checking and so, delay most typing decisions as much as feasible. Thus they sacrifice slightly on performance, and allow for more expressiveness and freedom.


==Type Systems==
==Type Systems==
Type System is defined formally as
"A tractable syntactic method for proving the absence of certain program behaviors by classifying phrases according to the kinds of values they compute."[http://en.wikipedia.org/wiki/Type_system]
The study of type systems is called Type Theory and has a significant role in Computer Language Design, apart from Computer Architecture, Compiler Construction and study of Grammars. Simplistically viewed, a Type System provides an abstraction to a collection of bits. All data to a computer is sequence of bits. The hardware is incapable to segregating or separating them into memory addresses, instruction code, characters, integers and floating-point numbers, since all it sees is the bit stream. However, any application makes references to its available memory within the program, as variables. Type system provides the necessary abstraction to programmers, offering them a higher level, modular view at the implementation, by, for example, allowing them to think of strings as a char collection, rather than a stream of bytes.
===Static Typing===
===Static Typing===
===Dynamic Typing===
===Dynamic Typing===
==Performance Comparison==
==Performance Comparison==
==Optimizations to Dynamic Languages==
==Optimizations to Dynamic Languages==

Revision as of 16:30, 21 September 2009

Overview

Static languages are known for its conservative approach to language processing, making most typing decisions at compile time itself thereby allowing the compilers to optimize on the byte code generated and provide better type-error checking. Thus, performance is tweaked in these languages. Dynamic languages, on the other hand, attempt to improve the productivity of the average developer, allowing him more flexibility in terms of type checking and so, delay most typing decisions as much as feasible. Thus they sacrifice slightly on performance, and allow for more expressiveness and freedom.

Type Systems

Type System is defined formally as

"A tractable syntactic method for proving the absence of certain program behaviors by classifying phrases according to the kinds of values they compute."[1]

The study of type systems is called Type Theory and has a significant role in Computer Language Design, apart from Computer Architecture, Compiler Construction and study of Grammars. Simplistically viewed, a Type System provides an abstraction to a collection of bits. All data to a computer is sequence of bits. The hardware is incapable to segregating or separating them into memory addresses, instruction code, characters, integers and floating-point numbers, since all it sees is the bit stream. However, any application makes references to its available memory within the program, as variables. Type system provides the necessary abstraction to programmers, offering them a higher level, modular view at the implementation, by, for example, allowing them to think of strings as a char collection, rather than a stream of bytes.

Static Typing

Dynamic Typing

Performance Comparison

Optimizations to Dynamic Languages

Case Studies

Conclusion

See Also

References