Intro

Computers can do a myriad number of tasks and types of tasks. There is an endless number of ways to implement each task. One of the variables involved is to choose which programming language or languages to use.

  • Implementation Range. Some languages are designed for specific uses; some have a broad range of uses but still can't do everything.
  • Extensibility. A language should be able to extend the kinds of functionality a given program has.
  • Scalability. A language should be enable a program to scale up with increasing volume of workload.
  • Technical Support. A language should have good documentation, standardization, and wide usage across the industry. This helps in debugging and team efforts.
  • Execution Efficiency. Zippy, powerful, reliable execution.
  • Creation Efficiency. Zippy, powerful, reliable creation, compilation, implementation, debugging, testing, etc.
  • Code Reusability. You should be able to reuse your own code as well as access large libraries of pre-written code that come standard or are made by other developers. (In other words, OOP)
  • Simplicity and expressiveness for productivity
  • Robustness, safety, and security
  • Architecturally neutral and portable
  • Internet savvy
  • Concurrency
  • Object orientation
  • Interoperability

Here is how Ziring [http://users.erols.com/ziring/dopl.html] grouped languages by type:

  • Application/Macro languages, extension and customization languages. EGs: VBA, Elisp
  • Command and Scripting languages. EGs: csh, Perl
  • Database, Report-generation, and Text-processing languages. EGs: TeX, RPG, Mumps
  • Functional and Lambda-calculus-based languages. EGs: Lisp, ML
  • Logical, Rule-based, and Inference-based languages. EGs: Prolog, OPS5
  • Mathematical, statistical, modeling, and simulation languages. EGs: Magma, SLAM
  • Object-oriented programming languages. EGs: Java, Smalltalk
  • Parallel, multi-programming, or distributed processing languages. EGs: CSP, Linda
  • Block-structured 'traditional' languages. EGs: C, Pascal
  • Threaded interpreter or stack-based languages. EGs: Forth

Applicable Environment

Some languages are designed to work in different environments. Here are a few applicable environments:

  • Stand-alone PC Apps.
  • Mainframe.
  • Client/Server Apps.
  • Component.
  • Client-Side Scripting.
  • Server-Side Scripting.
  • Mobile Devices.
  • Hard wired, eg radio alarm clocks.

The different class libraries that a language can work with have a tremendous affect as to the power and applicability of a language.

Compiled v Interpreted

A compiled programming language must be developed using an API (Application Programming Interface, software that for programming in a particular programming language). The code that a developer sees and modifies using the API is called source code. All the source code must be checked and translated by a compiler into platform specific object code. The resulting object code is usually either in assembly or machine language. The resulting object may be code modules that must be pulled together by a linker (aka link editor or binder) or brought over from some source into main memory by a loader. The final result is usually an executable program (EG: .exe) or a component (EG: .dll).

An interpreted language (aka script language), on the other hand, can be written using an API or a regular text editor (since the files produced are ordinary text). The script is interpreted sequentially (line by line) by an interpreter (like a browser) into executable machine language. Bits of script can be also be generated on the fly.

EG:

  • JavaScript source code is directly interpreted by a user's browser into machine language.
  • C++ source code is compiled into executables (of machine language) that are platform dependent.
  • Java is both compiled and scripted: Java is compiled into bytecode and then those bytes are interpreted by a JVMs (Java Virtual Machines) on different platforms.
  • The .NET languages (VB .NET, C#, etc) are both compiled and scripted: The source code is compiled into CIL (Common Intermediate Language) bytecode and then those bytes are interpreted by a CLR (Microsoft Common Language Runtime) virtual machine variations of Windows.

Data Type Checking

Each variable has a data type (EG: text, integer, or floating point). It is important to check the data type of variables so as to avoid errors when data types are confused (EG: storing a floating point value in a Boolean variable).

Variable typing for some languages:

  • JavaScript/VBScript (with variants) = Untyped
  • Lisp = weakly typed.
  • C/C++ = Loosely statically typed
  • Java/C# = Strongly statically typed
  • Python/Ruby/Lisp/Smalltalk/Objective-C = Strongly dynamically typed

Untyped means that variables can change the data type it holds. EG: x = 6; x = "six";.

Static type checking checks the data types at compilation time. This is inflexible but allows the runtime execution to go faster.

Dynamic type checking checks the data types at runtime. This allows more flexibility and complexity at runtime but slows down execution, is less safe, and is harder to debug.

Development Environment

Some languages have very simple development environments. EG: Any text editor.

Some have more sophisticated development environments, usually called an IDE (Integrated Development Environment). The IDEs usually have a GUI (Graphical User Interface), whereas the simpler development environments are usually text based, i.e. non-GUI.

Free-Form

In earlier programs, the positioning of characters was significant because physical punch cards were used and the idea of positioned characters was carried over. A free-form language uses whitespace (instead of positioning) to delimit tokens (the smallest lexical component of a programming language).

Imperative v Declarative

Imperative programming (aka procedural programming) is computation that retains knowledge of the system state. Imperative programming describes what is done and how. Most languages are imperative (EGs: FORTRAN; ALGOL; PASCAL; C; Ada; Java. See also Imperative programming languages [W]).

Declarative programming is computation that offhands the system state. Declarative programming describes what is done but not how.

Here is a rough definition of functional programming.

Functional programming is a style of programming that emphasizes the evaluation of expressions, rather than execution of commands. The expressions in these language are formed by using functions to combine basic values. A functional language is a language that supports and encourages programming in a functional style. -FAQ at comp.lang.functional.

Bottom line: A solution that takes many lines of code in imperative languages (EGs: C, Java, C#), might only take a few lines of code in a functional language (EGs: Lisp, Scheme, ML, Haskell, Caml, F#). This is because much lower-level (like numerous for-loops and massive overloading) is handled very easily.

See also the comp.lang.functional FAQ [§].

Language Level

The more a programming language resembles machine language, the "lower" it is considered. In the early days of computers, humans had to manipulate the hardware directly. Then they developed pairs of machine and assembly languages for each kind of system. Since then it has become much more common to use high-level languages. However, humans still write in assembly language for cases of extreme speed or for when functionality not available to a high-level language.

  • 0GL (Zeroth Generation Language). 0GL is just manually tweaking a machine to make it work the desired way.
  • 1GL (First Generation Language, aka machine language). 1GL is written in binary. Each system understands specific binary combinations to mean specific things for the hardware to do. Computers and hardware talk to each other with machine language.
  • 2GL (aka assembly language). Assembly languages correspond 1-to1 with with machine language but is rendered in "human readable" mnemonics. Assembly language is converted into machine language with an assembler; the reverse is converted with a dis-assembler. The abbreviation "ASM" is frequently used to name assembly languages and assemblers. Some assembly extensions include these: .ash, .asi, .asm, .aso, .src, .tah. Assembly is good for very low level control, extreme speed (2x as fast as c), and/or minute program size.
  • 3GL (aka high-level language). 3GLs use a good number of real world words in semi-sentence like fashion. Examples include Pascal, BASIC, Java, Visual Basic, PERL, and JavaScript. High-level language is translated into assembly or machine language by compilation or interpretation.
  • 4GL (aka app code). 4GLs are designed for developing in specific software environments. EGs: SQL for RDBMs; ABAP for SAP.
  • Pseudo code is code that is used by humans to talk about code to other humans. This can be natural speech or code that has semantic meaning but does not follow formal syntax.

Object Oriented

POP (Process Oriented Programming) conceptually focuses on developing processes whereas OOP develops objects and the processes involved with them. A POP program tends to start at the first line of code and then proceed on through the program in a particular sequence.

OOP (Object Oriented Programming) has three signature principles:

  • Encapsulation. This basically turns bits of code into "black boxes". You don't need to know the internal workings, you just need to know the minimal amount needed to interface with the code. The interface is usually done with properties, methods, and events.
  • Inheritance. Why redo work when you can inherit it? If class "A" has a lot of features you like then make a subclass "Aa" that inherits much of the features of class "A".
  • Polymorphism. When a subclass inherits a method (EG: The shape class may have subclasses of square and circle), the methods should change (be redefined or polymorphed) for the new class (EG: Circumference() method of the shape class has the same name for its subclasses but the actual equation behind Circumference() is different for the square and circle subclasses).

OOP allows you to make classes (and hence objects) that encapsulate the data and the functions that operate on that data. This makes programs more modular and thus easier to debug, reuse, maintain, and enhance. An OOP program tends to execute different sections of code in response to different events, such as clicking a button.

Programming language examples:

  • BASIC was POP. A BASIC program usually consisted of a single file that had limited interaction.
  • Visual Basic impersonates OOP. A VB program usually consists of multiple modular units and its programs can have lots of user interaction.
  • VB.NET is OOP. Complete with inheritance.

The quantity, quality, and types of class libraries that a language can work with (esp. built-in or by 3rd party vendors) are a tremendous factor in determining the power and applicability of a language.

Open Source

"Source" code is the version of a computer program that can be read and manipulated by programmers. Source code is eventually translated into assembly, i.e. machine language, raw binary instructions, that can be run as software.

There are two primary rights that are important regarding software distribution: editorial and financial. This is usually established by a copyright license.

  • Editorial rights are concerned with the editorial "freeness" of source code. Source code can be somewhere between completely open or completely closed. Copyleft ::= 'Where copyright law is seen by the original proponents of copyleft as a way to restrict the right to make and redistribute copies of a particular work, a copyleft license uses copyright law in order to ensure that every person who receives a copy or derived version of a work, can use, modify, and also redistribute both the work, and derived versions of the work. ' [W]
    • Source code can be completely "open", i.e. anyone can modify or redistribute it.
    • Source code can be completely "closed", i.e. only the official owner of the source code can modify or redistribute it.
  • Financial rights are concerned with the financial "freeness" of software. Software can be somewhere between completely no-cost or explicitly commercial.

While the term "free" is confusing (Free-source or free-cost or both?), it is nevertheless historically entangled with the whole idea of "open source". Hopefully the schism between the two camps will settle and disappear.

GRATIS
No Cost
Free Beer
COMMERCIAL
Some Cost
Priced Beer
LIBRE
Open Source
Free Speech
  • EG: Mozilla Firefox, a web browser.
  • Public domain software.
  • Free software. Aka FLOSS or F/LOSS (Free/Libre Open Source Software); GLOSS or G/LOSS (Gratis/Libre OSS); or some other combination.
  • EG: Red Hat Linux, an operating system.
  • OSS (Open Source Software).
  • Shared source. Microsoft is sharing some source code but staying commercial.
PROPRIETARY
Closed Source
Censored Speech
  • EG: Microsoft Internet Explorer, a web browser.
  • Freeware. Usually gratis but if used commercially then there is a charge.
    • Baitware. Software that is more like an ad or a tease.
  • Shareware. Aka trialware; demoware. Half-gratis. Distributed free on a trial basis. Shareware may be a limited version of the full version or has some annoying feature.
    • Adware. Advertising supported software. Usually annoying.
    • Beerware. The only possible cost is a beer or some other minor contribution.
    • Careware. Aka charityware; donateware. The only possible cost is a contribution to a charity.
    • Crippleware. Aka hostageware. A very limited version of the full version.
    • Emailware. The only possible cost is that the user send the maker an email.
    • Nagware. Has some annoying feature until paid for.
    • Postcardware. The only possible cost is that the user send the maker a postcard.
  • EG: Microsoft Windows, an operating system.
  • Abondonware. Proprietary commercial software that is no longer supported by the copyright holder. Many feel that these should be moved into the public domain.
  • Private software.

Some distinctions:

  • Bloatware. Software that has had too many features creep into it. Analogous to a run-on sentence.
  • Malware. Gratis software designed to take over, damage, abuse the user's computer without the user's approval or knowledge. This includes spyware, viruses, worms.
  • Shovelware. Sloppy software. It either has too many features or was lazily ported from one platform to another.
  • Vaporware. Software or hardware that is announced but never finished (or never seems to).
  • Warez. Illegal software in violation of copyrights.

1983. Richard Stallman invented the concept of "free software" in response to his perception of restrictiveness at MIT.edu. His GNU project (GNU's Not Unix) is most famous for its free-source version of Unix. The GNU projecet has grown from Gnu.org into the Free Software Foundation [FSF.org]. Many licenses are still modeled upon the GPL (aka GNU General Public License; GNU GPL).

"Free software'' is a matter of liberty, not price. To understand the concept, you should think of "free'' as in "free speech,'' not as in "free beer.''

Free software is a matter of the users' freedom to run, copy, distribute, study, change and improve the software. More precisely, it refers to four kinds of freedom, for the users of the software:

  • The freedom to run the program, for any purpose (freedom 0).
  • The freedom to study how the program works, and adapt it to your needs (freedom 1). Access to the source code is a precondition for this.
  • The freedom to redistribute copies so you can help your neighbor (freedom 2).
  • The freedom to improve the program, and release your improvements to the public, so that the whole community benefits (freedom 3). Access to the source code is a precondition for this.

- GNU.org/philosophy/free-sw.html

The Open Source Definition [off-site] was first drafted by Bruce Perens in 1997 as "The Debian Free Software Guidelines". The term "open source" was derived in 1998 by Bruce Perens, Eric S. Raymond, and others who formed the OSI (Open Source Initiative) [OpenSource.org]. They list many licenses that support open-source.

While there are many profit issues that need to be worked out, open source has been showing many advantages over closed-source: The advantage of open source v closed source is similar to the advantage of parallel processing over serial processing because many, many programmers can work on an open source app, while only the few that can work on a closed source app.

  • Lower development cost.
  • Higher app quality.
  • Better app support.
  • Lower consumer cost.
  • Quicker creation, debugging, and upgrading.

Some of the languages most associated with open source include: c/c++, java, perl, php, python, ruby, tcl, Eiffel, Lua, Smalltalk & Squeak.



GeorgeHernandez.comSome rights reserved