The Survey of Programming Language Classification
来源:互联网 发布:as网络语言什么意思 编辑:程序博客网 时间:2024/06/05 16:22
本博客地址:www.xnerv.wang
ABSTRACT
1.INTRODUCTION
With the increasing of programming language varieties, more and more programmers have to study and make use of several programming languages in the meantime. Different languages's nature is the same. According to several criteria, languages can be devided into several categories respectively. By studying the criteria and methods of classification, programmers could understand the nature of programming language, and master quickly new languages. But some definitions about language classification on the net are ambiguous and even incorrect at present. To distinguish and definitize these related definitions, this paper surveys Wikis and some technical blogs, and determines clearer definitions in terms of dynamism of language, dynamism of type system, intensity of type system and compilation of language in sequence. In addition, this paper would classify several frequently-used langueges based on the definitions mentioned above. What calls for special attention is that, this paper doesn't seek precise and theoretic definitions or classification. It just provides relatively plain explanations for development practice.
2.CLASSIFICATION OF PROGRAMMING LANGUAGES
2.1 Dynamism of Language
Dynamic Programming Language(DPL) is sometimes also called Dynamic Language unofficially, a class of high-level programming language that execute many common behaviors at runtime that Static Programming Languages might perform during compilation, including extension of the program, by adding new code, by extending objects and definitions, or by modifying the type system, all during program execution. Most dynamic languages are also dynamically typed, but not all are[1].
Static Programming Language(SPL) is sometimes also called Static Language unofficially, relative to Dynamic Language.
2.2 Dynamism of Type System
Dynamically Typed Language, sometimes called Dynamic Type-Checking Language(DCL) is a language in which types are discovered at execution time, the opposite of Statically Typed Language[2].
Statically Typed Language, sometimes called Static Type-Checking Language(SCL), is a language in which types are fixed at compile time. Most Statically Typed Languages enforce this by requiring you to declare all variables with their datatypes before using them[2].
2.3 Intensity of Type System
Strongly Typed Language(STL) is a language in which types are always enforced. If you have an integer, you can't treat it like a string without explicitly converting it[3].
Weakly Typed Language(WTL) is a language in which types may be ignored, the opposite of Strongly Typed Language. WTL doesn't mean no variable types, but one variable's type can be seemed alterable in its life cycle, just with no strict type constraints, and without any explicit conversion. Generally speaking, there is no need to distinguish dynamism of type system for WTL.
2.4 Compilation of Language
A compiled language is a language whose implementations are typically compilers , and not interpreters[4].
A interpreted language is a language that avoids explicit program compilation. The interpreter executes the program source code directly, as a processor or scripting does[5].
A combination of both solutions is also increasingly common: a compiler can translate the source code into some intermediate form (often called bytecode), which is then passed to an interpreter which executes it[4].
A scripting language or script language isn't a traditional programming language, similar to a "dummy programming language". It supports the writing of scripts, programs written for a special runtime environment that can interpret and automate the execution of tasks which could alternatively be executed one-by-one by a human operator. So maybe we could call it a new interpreted language[6].
3.DISCUSSIONG OF SEVERAL LANGUAGES
Table 1. Classification of several frequently-used langueges
STLWTLSCLC/C++(SPL), C#(DPL), Java(DPL)PHP(DPL), Javascript(DPL)DCLObjective-C(SPL)
3.1 C/C++
C/C++ are SPLs, SCLs. Generally speaking, we call C/C++ STLs, as it have a declared type, and support the use of explicit casts of arithmetic values to other arithmetic types. But C/C++ are sometimes said to be more weakly typed than C#, Java and so on[7], probably based on the fact that C/C++ supports more kinds of implicit conversions, and allows pointer values to be explicitly cast while Java do not[3].
3.2 C#
C# is a DPL as a result of its reflection mechanism, and generally speaking, a SCL. But C# added a keyword called "var" from version 4.0, so it also looks like a SCL now. C# is also belonged to STL though it allows disabling dynamic type checking by explicitly putting code segments in an "ansafe context".
3.3 Objective-C
Objective-C is extension of C, so wo just discuss the extended portion. Objective-C is a SPL, and a DCL due to "id" keyword. Objective-Cis also a STL.
3.4 Java
Java is a DPL as a result of its reflection mechanism like C#, a SCL and a STL.
3.5 Python
Python is a DPL, a DCL and a STL.
3.6 PHP
PHP is a DPL. Although PHP is usually called a WTL, but we could get variable's datatype by gettype() function. Maybe it can be seemed as implicit type conversion like C/C++.
3.7 Javascript
Javascript is DPL, a WTL.
4.CONCLUSION
This paper surveys determines clearer definitions in terms of dynamism of language, dynamism of type system, intensity of type system, compilation of language and type safety in sequence, and classify several frequently-used langueges based on these definitions. As we see, a practical programming language tending to be compound of several classifications, or classification boundary being too blurred to make a classification, so frequently causes suspicion and dispute.
5.REFERENCES
[1] http://en.wikipedia.org/wiki/Dynamic_programming_language
[2] http://en.wikipedia.org/wiki/Type_system
[3] http://en.wikipedia.org/wiki/Strong_and_weak_typing
[4] http://en.wikipedia.org/wiki/Compiled_language
[5] http://en.wikipedia.org/wiki/Interpreted_language
[6] http://en.wikipedia.org/wiki/Scripting_language
[7] http://bbs.csdn.net/topics/380249796
(This paper comes from http://blog.csdn.net/nerv3x3/article/details/9199259, Author: nerv3x3)
- The Survey of Programming Language Classification
- The BookList of Programming Language
- study of The C Programming Language
- notes of "The C++ Programming language"
- The kayword "new" of CPP programming language
- Stability of the C++ ABI: Evolution of a Programming Language
- Leading Programmers Remember the Impact of The C Programming Language
- a expample of the c programming language.(temp)
- The amazing efficiency of pointer in C Programming Language
- The Curl Programming Language
- The Curl Programming Language
- The Programming Language Tips
- The Programming Language Idioms
- The Curl Programming Language
- The D Programming Language
- The C++ Programming Language
- The C programming language
- the c++ programming language
- Linux操作系统学习_用户态与内核态之切换过程
- 2013-6-28-StreamWriter写入器
- xargs与cp结合使用
- 将Windows Server 2012改造成桌面操作系统(Windows 8)的方法
- oracle中如何根据一个字段名查找出所属的表名
- The Survey of Programming Language Classification
- 【windowSoftInputMode】android软键盘隐藏
- URL带有其他参数时,如何使用PHP的CI框架分页类?
- Instance Crash & Bug 13846531
- hello CUDA
- Ext.form.RadioGroup 和 Ext.form.Radio 基本定义
- 大学两年总结(计算机专业)
- C++回调函数模式的使用.
- 边用边学shell编程