Search This Blog

Tuesday, July 9, 2013

Programming Languages

Programming Languages

Alan Perlis once said: "A language that doesn't affect the way you think about programming, is not worth knowing".

Here are some opinions and facts about a selection of programming languages by Dr Mark Utting (a lecturer in the Department of Computer Science at The University of Waikato).
The Open Directory Project has lots of programming language information.
For examples of programming in 200+ different languages, check out the 99 Bottles of Beer page. The Dylan version is nice, but make sure you check out all the C++ versions too! The template version is amazing!
Another overview of programming and web languages is on test-king.com.

Object-Oriented Languages

The Cetus Team maintains a large collection of links about most object-oriented languages.
Let us start with some lesser-known, but more novel, object-oriented languages, then work down to 
the well-known mainstream ones.

One of my favourite object-oriented languages is Cecil, by Craig Chambers. It is a multiple-dispatch language that supports both exploratory untyped programming and large-scale statically-typed programming. It includes some new and very expressive ideas (see the paper "Predicate Dispatching: A Unified Theory of Dispatch" by Michael Ernst, Craig Kaplan and Craig Chambers). Cecil is quite similar to the theoretical language that I developed in my PhD thesis.

An equally nice language is Dylan. Like Cecil, Dylan is a safe, strongly-typed, pure object-oriented language that supports multiple dispatch, modules, first-class functions etc. Dylan was originally designed by Andrew Shalit at Apple. There is a commercial implementation of it for Windows 95/NT platforms available from Functional Objects Inc., with a personal version available via free download. Free versions of Dylan for various UNIX machines are available from the Gywdion group. Other useful 

Dylan sites include:

the Introduction of Shalit's book, `The Dylan Reference Manual', gives an overview and rationale for Dylan;
Eric Kidd's 'Getting Started With Dylan' tutorial is the best online tutorial;
an A First Look at Dylan: Classes, Functions, and Modules an introductory article about Dylan from Apple (Steve Strassman);
Gwydion's 12 short example Dylan programs.
Paul Haahr's Procedural Programming in Dylan compares Pascal and Dylan versions of several simple functions. Section 3 introduces Dylan's support for higher-order functions in a gentle way. (His site also has a YACC grammar for Dylan, and an alternative multiple-inheritance linearization;
A small Dylan FAQ (Frequently Asked Questions).
The open directory project has lots of dylan links.
The Dylan Language Standard group is managing changes to the Dylan language.
The draft Dylan Reference Manual is available in PDF format (2Mb). A final version of this was published by Apple (via Addison-Wesley) in 1996, and is available at a special price from Functional Objects. There is also a nice browsable html version of it.
the Gywdion implementation of Dylan, started by the CMU Gwydion Group and being continued by volunteers (here is their mailing list archives). It is available for various machines
The Open Directory Project's Dylan page.
the Dylan Code Repository for reusable Dylan code.
Chris Double has written several example programs including one that displays .bmp files in a window.
Peter Norvig's slide presentation on Design Patterns in Dynamic Languages includes examples of patterns in Dylan, LISP, C++, Smalltalk and Sather.
A Dr. Dobbs Journal article on Dylan (by Tamme D. Bowen and Kelly M. Hall) which defines the semantics of the main Dylan features in Haskell!
This 1995 MacTech Magazine article (Vol 11, No. 8). includes a brief description and some screenshots of the original Apple Dylan Development Environment.
Miscellaneous old Dylan documents at the CMU AI repository.

Python is another favourite. Interpreted, and ideal for knocking up quick prototypes, but with a nice module system, lots of handy libraries, and almost purely object-oriented.

Apart from Simula-67, Smalltalk started the OO craze. Implementations are becoming more easily available now. (See also ObjectShare's non-commercial VisualWorks Smalltalk, available for Linux and Windows)Squeak is an open source Smalltalk that is becoming very popular. A lot of Smalltalk-related information and projects are accessible from the Panasoft Smalltalk Links. Here is a nice Smalltalk tutorial from IBM.

Some other clean OOLs are:

Scala is a modern multi-paradigm programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages. All Java classes can be imported and used within Scala programs.
Blue, a clean OOL especially designed for teaching first-year students.
Eiffel was the first object-oriented language to give good support for software engineering concepts like design by contract.
Modula-3
Oberon, from Nicolas Wirth, the designer of Pascal.
Sather
Component Pascal is an object oriented programming language most closely related to Oberon-2. Compared to Oberon-2 it adds a number of annotations which are intended to enhance the type-safety of component oriented programs. QUT offers an open source compiler which generates Java bytecodes or Microsoft.NET output. Alternatively, Oberon Microsystems have made their 'BlackBox Component Builder' compiler/environment for Component Pascal open source now.
TOM is a new object-oriented programming language that advocates unplanned reuse of code (classes can be extended in very flexible ways, even without source code for them).
Suneido is a free, open-source, pure-OO language whose syntax is similar to C++ or Java, but simpler. It is a safe, dynamic language like Smalltalk, enabling rapid development. It supports automatic garbage collection, exception handling and has builtin client-server relational database, user interface and reporting frameworks. Available for all Windows platforms, but a Linux version is planned.
D from Digital Mars is intended to be a clean successor to C++. It has good support for design-by-contract programming, like Eiffel.
How about a simple OO Forth? It takes less than one screenful of Forth to define objects, classes and single inheritance.
Then we have the less clean C extensions: Objective-C seems less widely used now, but is supported by gcc.

C++ is the most widely used object-oriented language. See: Readings, FAQS, ANSI Standard or here
A recommended book on the design of C++ is

"The Design and Evolution of C++", by Bjarne Stroustrup, Addison-Wesley, 1995.

I quite like the standard template library (STL) of C++ (local docs here). It allows higher-order programming to a certain extent and comes with about 10 generic data structures and 70 simple algorithms over them. See Mumit's STL Newbie guide for some handy STL hints. Other STL-like libraries include: the Graph Template Library (GTL).

There seem to be two major contenders for the "best GUI toolkit" title at the moment. GTK+ (the GIMP toolkit) is more C oriented, but does slots and signals without a preprocessor, whereas Qt uses a preprocessor (MOC) but has the dis/advantage of being a complete solution for porting to Windows 95/NT. The GTK+ toolkit has bindings for several languages, including a C++ wrapper for GTK+ called gtk-- (or FTP).

D is another object-oriented extension of C, designed for systems programming, but with garbage collection, runtime type identification and templates.
Of course, there is also Java which was designed to be safer and cleaner than C++ (see the Java white paper, a Java tutorial, Java Games and Java Puzzles).
[TODO: update this section, now that I've used Java for a few years.]

The two most attractive aspects of Java are that it can be a safe language (all errors are caught by the compiler or bytecode checker or cause runtime exceptions), and its portability (especially its wide range of standard libraries).

Some problems with Java that I've heard about include: hard to format a floating point number, integers etc. are not objects so cannot be subtyped or subranged, non-portable thread semantics, text I/O difficult for beginners. The lack of generics was a real pain in Java (lots of type casting), but now Java 5.0 has fixed this at last.
Here are several interesting extensions/variants of Java:
The Java Modelling Language, is Java extended with specification facilities (class invariants, preconditions, postconditions etc.); These can be added within comments, so that existing Java tools are unaffected, but the JML tools can perform deeper analysis of the program to detect more errors.
Jbed is a commercial real-time subset of Java that supports deadline-driven scheduling.
There are also quite a few other languages being implemented on top of the Java Virtual Machine, see here, here and here.

Objects have also been added onto Perl (Perl 4 was my least-liked language!) and Ada. In fact, Ada was actually the first ISO standardized OO language (Ada95)! A new ISO version of Ada, currently known as Ada200Y, will include Java-like interfaces and a larger predefined library etc.

Rational Software Corporation have done an interesting comparison between development in C and Ada.

Rational Software Corporation also sell Purify (a heap-memory checker) and are responsible for the OO Unified Modelling Language, which is now the industry standard for specifying the structure of OO systems.

Finally, CLU is an old but influential language that introduced important ideas for iterating through collection objects, for exception handling and a carefully-designed theory of object invariants, pre/post conditions etc.

The book Abstraction and Specification in Program Development, by Barbara Liskov and John Guttag, MIT Press, 1986. Here are some of my notes on the book.
A 1978 paper: A Critique of the Programming Language CLU by James Peterson. This also gives a brief overview of the language.
Here are some Software Engineering methods/tools for object-oriented programming:
Project Technology: Shlaer-Mellor methodology
ObjectTime: Real-Time Object-Oriented Modeling (ROOM)
Rational: Unified Method & Jacobson

See John Yeager's S/W Engineering resources for more information.

Functional Programming Languages

Haskell is the most popular functional programming language and is the one that I've used a lot (for example, my Z animator, Jaza). It is an elegant lazy high-level language, with fast compiled implementations plus a interpreter (HUGS) that is good for development. It also comes with a large collection of amazing libraries for writing parsers, pretty-printers, MIDI composition programmes (Haskore) etc., plus the ability to interface to arbitrary C procedures in a functionally clean way.

One of the advantages of Haskell is that expert programmers can extend the language by defining their own operators and 'monads', to get a very concise application-specific language. The disadvantage of this power is that if you overuse it, it becomes difficult for other people to read your programs!
Other popular functional programming languages include the eager (non-lazy) ML family of languages, such as Standard ML and Objective CAML. Here is an introductory book Objective CAML for Scientists.

Logic Programming Languages

There is a WWW virtual library for logic programming. Michael Ley has a database/logic programming bibliography The ALP (Association of Logic Programming) newsletter.
I am part of the Starlog research group, which is designing and implementing a new pure logic-programming language that is especially suited to reactive and real-time programming. Recently, I've implemented a version of Starlog for controlling Lego Robots!

Prolog is the most commonly known logic programming language, albeit impure. A few well-known implementations are: Quintus Prolog, SICStus Prolog, Eclipse Prolog, SWI Prolog (free!). Qu-Prolog is Prolog customised for formal methods (it handles quantifiers, object-variables and substitutions as primitives).

The Prolog at VIP is free for non-commercial use. Another free one is TRINC-Prolog. Michael D. Kersey recommends Amzi! Logic Explorer and the "Adventures in Prolog" (with a "very nice and complete tutorial"). Seehere for other free Prologs. [mindgap@my-dejanews.com, Alexander.Apostolovski@worldonline.be, and mkersey@metricom.com; comp.lang.prolog, 12Mar99.]

Roman Bartak's Interactive Prolog Guide includes FAQs, program samples, implementations, and references.

The BURKS project provides documentation and free Prolog implementations for DOS, Windows etc.
LPA Prolog for Windows -- with an IDE and single-step debugger -- offers a free 30-day trial. [Nov98]

Amzi! Logic Explorer is free for personal use. It comes with a full tutorial and sample programs, plus a GUI development environment. Amzi! inc. also offers a Prolog compiler and embeddable libraries (for C/C++, Java, Delphi, VB, etc) for a 90-day trial. [Dec98]

Mercury is an elegant, pure, logic programming language from Melbourne University. The fastest logic programming language around...

The Cetus Links OO Prolog page has links to object-oriented logic programming languages. Curry is an extension of Haskell that adds logic-programming features like logical variables, constraint solving and concurrent and distributed programming.

Here are some useful online sites for constraint logic programming:

The constraints archive;
Bartak's online constraint programming tutorial;
Tsang's 1993 book, Foundations of Constraint Satisfaction is out of print, but available from him via online order.
CLPGUI is an open-source Graphical User Interface for Constraint Logic Programming.
Not really CLP, but here is a useful site on good algorithms for solving numerical problems (numerical analysis books etc.).
The quarterly Logic Programming Newsletter is now online.
The textbook Logic, Programming and Prolog (2ed) by Ulf Nilsson and Jan Maluszynski is now available online. It covers theoretical aspects of logic programming as well as practical programming in Prolog, and extensions logic programming such as equational logic programming, constraint logic programming and query answering in deductive databases.
Transformation Languages
Some languages for transforming models and programs:
QVT (Query/View/Transformation) is an OMG standard for transforming models into other models.

Text Formatting Languages

LaTeX is the defacto text formatting system for academic papers containing mathematics. There is lots of online reference material for it. See also the Comprehensive TeX Archive Network (CTAN). More documentation is here.

Basser Lout is another text formatting language that produces Postscript/PDF directly and has a more elegant (and functional!) programming/macro language than TeX.

For HTML (the web markup language):

A simple HTML tutorial.
Ian Graham's guide to HTML.
Tips on writing HTML files to reduce net load.
Nelson Minar's html-helper-mode is an excellent macro package for writing writing HTML pages in Emacs. I use it with the table extensions by Joe Hildebrand.
XML-related Languages
The World Wide Web Consortium (W3C) is the official source for XML-related documents, and has lots of tools links.
ZVON.org has lots of XML-related tutorials and reference manuals, including an XML glossary, unicode character references a good reference for XSLT
Documentation Generators
There are lots of programs available for generating HTML and/or LaTeX documentation from C++ source files etc. For example:
Javadoc generates HTML pages from Java source code.
Doxygen generates crosslinked HTML pages in a style similar to the Qt documentation. It also handles the Signal/Slot declarations of Qt.

Free Implementations

A Catalog of Free Compilers and Interpreters.
Poplog is an open source, extendable, portable, multilanguage software development environment providing incremental compilers for several interactive programming languages: Pop-11, Prolog, Common Lisp, and Standard ML. It comes with documentation, libraries, and teaching materials for AI and Computer science (and more general programming).

Language Design Issues and Mistakes

Here are a few interesting papers about language design:

Go To Statement Considered Harmful (a classic, by Dijkstra)
Arrays and Pointers Considered Harmful, [Ince 92] D.C.INCE, ACM SigPlan Notices, January 1992.
Primitive Types Considered Harmful (why Java should be a pure OO language).
Interface Pointers Considered Harmful (About COM and C++, in The C++ Report, Sep 1995)
COM Smart Pointers Even More Harmful (A follow-up article in The C++ Report, Feb 1996)
An interesting comparison of language abstraction levels which showed that an almost functional language, CAML, was the best language for a large complex numerical simulation task.
Garbage collection is an important aspect of modern programming languages. Richard Jones's Garbage Collection Pages and Ravenbrook's Memory Management Reference are good resources for everyone interested in memory management and garbage collection.
Source Code
Sourcebank is a search engine for finding reusable source code, postscript papers about software, and articles in online programming journals.

List of programming languages

The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and historical ones, in alphabetical order, except for dialects of BASIC and esoteric programming languages.

Note: Dialects of BASIC have been moved to the separate List of BASIC dialects.
Note: This page does not list esoteric programming languages.

A

A# .NET
A# (Axiom)
A-0 System
A+
A++
ABAP
ABC
ABC ALGOL
ABLE
ABSET
ABSYS
Abundance
ACC
Accent
Ace DASL
ACT-III
Action!
ActionScript
Ada
Adenine
Agda
Agilent VEE
Agora
AIMMS
Alef
ALF
ALGOL 58
ALGOL 60
ALGOL 68
Alice
Alma-0
AmbientTalk
Amiga E
AMOS
AMPL
APL
AppleScript
Arc
ARexx
Argus
AspectJ
Assembly language
ATS
Ateji PX
AutoHotkey
Autocoder
AutoIt
AutoLISP / Visual LISP
Averest
AWK
Axum

B

B
Babbage
BAIL
Bash
BASIC
bc
BCPL
BeanShell
Batch (Windows/Dos)
Bertrand
BETA
Bigwig
Bistro
BitC
BLISS
Blue
Bon
Boo
Boomerang
Bourne shell (including bash and ksh)
BREW
BPEL
BUGSYS
BuildProfessional

C

C
C--
C++ - ISO/IEC 14882
C# - ISO/IEC 23270
C/AL
Caché ObjectScript
C Shell
Caml
Candle
Cayenne
CDuce
Cecil
Cel
Cesil
Ceylon
CFML
Cg
Ch
Chapel
CHAIN
Charity
Charm
Chef
CHILL
CHIP-8
chomski
ChucK
CICS
Cilk
CL (IBM)
Claire
Clarion
Clean
Clipper
CLIST
Clojure
CLU
CMS-2
COBOL - ISO/IEC 1989
CobolScript
Cobra
CODE
CoffeeScript
Cola
ColdC
ColdFusion
Cool
COMAL
Combined Programming Language (CPL)
Common Intermediate Language (CIL)
Common Lisp (also known as CL)
COMPASS
Component Pascal
COMIT
Constraint Handling Rules (CHR)
Converge
Coral 66
Corn
CorVision
Coq
COWSEL
CPL
csh
CSP
Csound
Curl
Curry
Cyclone
Cython

D

D
DASL (Datapoint's Advanced Systems Language)
DASL (Distributed Application Specification Language)
Dart
DataFlex
Datalog
DATATRIEVE
dBase
dc
DCL
Deesel (formerly G)
Delphi
DinkC
DIBOL
Dog
Draco
Dylan
DYNAMO

E

E
E#
Ease
Easy PL/I
EASYTRIEVE PLUS
ECMAScript
Edinburgh IMP
EGL
Eiffel
ELAN
Elixir
Elm
Emacs Lisp
Emerald
Epigram
Erlang
es
Escapade
Escher
ESPOL
Esterel
Etoys
Euclid
Euler
Euphoria
EusLisp Robot Programming Language
CMS EXEC
EXEC 2

F

F
F#
Factor
Falcon
Fancy
Fantom
FAUST
Felix
Ferite
FFP
Fjölnir
FL
Flavors
Flex
FLOW-MATIC
FOCAL
FOCUS
FOIL
FORMAC
@Formula
Forth
Fortran - ISO/IEC 1539
Fortress
FoxBase
FoxPro
FP
FPr
Franz Lisp
Frink
F-Script
FSProg

G

G
Game Maker Language
GameMonkey Script
GAMS
GAP
G-code
Genie
GDL
Gibiane
GJ
GEORGE
GLSL
GNU E
GM
Go
Go!
GOAL
Gödel
Godiva
GOM (Good Old Mad)
Goo
Gosu
GOTRAN
GPSS
GraphTalk
GRASS
Groovy

H

HAL/S
Hamilton C shell
Harbour
Hartmann pipelines
Haskell
Haxe
High Level Assembly
HLSL
Hop
Hope
Hugo
Hume
HyperTalk

I

IBM Basic assembly language
IBM HAScript
IBM Informix-4GL
IBM RPG
ICI
Icon
Id
IDL
Idris
IMP
Inform
Io
Ioke
IPL
IPTSCRAE
ISLISP
ISPF
ISWIM

J

J
J#
J++
JADE
Jako
JAL
Janus
JASS
Java
JavaScript
JCL
JEAN
Join Java
JOSS
Joule
JOVIAL
Joy
JScript
JavaFX Script
Julia

K

K
Kaleidoscope
Karel
Karel++
Kaya
KEE
KIF
Kojo
KRC
KRL
KRL (KUKA Robot Language)
KRYPTON
ksh

L

L
L# .NET
LabVIEW
Ladder
Lagoona
LANSA
Lasso
LaTeX
Lava
LC-3
Leadwerks Script
Leda
Legoscript
LIL
LilyPond
Limbo
Limnor
LINC
Lingo
Linoleum
LIS
LISA
Lisaac
Lisp - ISO/IEC 13816
Lite-C
Lithe
Little b
Logo
Logtalk
LPC
LSE
LSL
LiveCode
Lua
Lucid
Lustre
LYaPAS
Lynx

M

M
M2001
M4
Machine code
MAD (Michigan Algorithm Decoder)
MAD/I
Magik
Magma
make
Maple
MAPPER (Unisys/Sperry) now part of BIS
MARK-IV (Sterling/Informatics) now VISION:BUILDER of CA
Mary
MASM Microsoft Assembly x86
Mathematica
MATLAB
Maxima (see also Macsyma)
Max (Max Msp - Graphical Programming Environment)
MaxScript internal language 3D Studio Max
Maya (MEL)
MDL
Mercury
Mesa
Metacard
Metafont
MetaL
Microcode
MicroScript
MIIS
MillScript
MIMIC
Mirah
Miranda
MIVA Script
ML
Moby
Model 204
Modelica
Modula
Modula-2
Modula-3
Mohol
MOO
Mortran
Mouse
MPD
MSIL - deprecated name for CIL
MSL
MUMPS

N

Napier88
NASM
NATURAL
Neko
Nemerle
NESL
Net.Data
NetLogo
NetRexx
NewLISP
NEWP
Newspeak
NewtonScript
NGL
Nial
Nice
Nickle
NPL
Not eXactly C (NXC)
Not Quite C (NQC)
Nu
NSIS
NWScript

O

o:XML
Oak
Oberon
Obix
OBJ2
Object Lisp
ObjectLOGO
Object REXX
Object Pascal
Objective-C
Objective-J
Obliq
Obol
OCaml
occam
occam-π
Octave
OmniMark
Onyx
Opa
Opal
OpenEdge ABL
OPL
OPS5
OptimJ
Orc
ORCA/Modula-2
Oriel
Orwell
Oxygene
Oz

P

P#
PARI/GP
Pascal - ISO 7185
Pawn
PCASTL
PCF
PEARL
PeopleCode
Perl
PDL
PHP
Phrogram
Pico
Pict
Pike
PIKT
PILOT
Pipelines
Pizza
PL-11
PL/0
PL/B
PL/C
PL/I - ISO 6160
PL/M
PL/P
PL/SQL
PL360
PLANC
Plankalkül
PLEX
PLEXIL
Plus
POP-11
PostScript
PortablE
Powerhouse
PowerBuilder - 4GL GUI appl. generator from Sybase
PowerShell
PPL
Processing
Processing.js
Prograph
PROIV
Prolog
Visual Prolog
Promela
PROTEL
ProvideX
Pro*C
Pure
Python

Q

Q (equational programming language)
Q (programming language from Kx Systems)
Qalb
QBasic
Qi
Qore
QtScript
QuakeC
QPL

R

R
R++
Racket
RAPID
Rapira
Ratfiv
Ratfor
rc
REBOL
Red
Redcode
REFAL
Reia
Revolution
rex
REXX
Rlab
ROOP
RPG
RPL
RSL
RTL/2
Ruby
Rust

S

S
S2
S3
S-Lang
S-PLUS
SA-C
SabreTalk
SAIL
SALSA
SAM76
SAS
SASL
Sather
Sawzall
SBL
Scala
Scheme
Scilab
Scratch
Script.NET
Sed
Seed7
Self
SenseTalk
SequenceL
SETL
Shift Script
SIMPOL
SIMSCRIPT
Simula
Simulink
SISAL
SLIP
SMALL
Smalltalk
Small Basic
SML
SNOBOL(SPITBOL)
Snowball
SOL
Span
SPARK
SPIN
SP/k
SPS
Squeak
Squirrel
SR
S/SL
Starlogo
Strand
Stata
Stateflow
Subtext
SuperCollider
SuperTalk
SYMPL
SyncCharts
SystemVerilog

T

T
TACL
TACPOL
TADS
TAL
Tcl
Tea
TECO
TELCOMP
TeX
TEX
TIE
Timber
TMG, compiler-compiler
Tom
TOM
Topspeed
TPU
Trac
TTM
T-SQL
TTCN
Turing
TUTOR
TXL
TypeScript

U

Ubercode
UCSD Pascal
Unicon
Uniface
UNITY
Unix shell
UnrealScript

V

Vala
VBA
VBScript
Verilog
VHDL
Visual Basic
Visual Basic .NET
Microsoft Visual C++
Visual C#
Visual DataFlex
Visual DialogScript
Visual Fortran
Visual FoxPro
Visual J++
Visual J#
Visual Objects
VSXu
Vvvv


W

WATFIV, WATFOR
WebDNA
WebQL
Windows PowerShell
Winbatch

X

X++
X#
X10
XBL
XC (exploits XMOS architecture)
xHarbour
XL
XOTcl
XPL
XPL0
XQuery
XSB
XSLT - See XPath

Y

Yorick
YQL

Z

Z notation
Zeno
ZOPL
ZPL


Source:
http://www.cs.waikato.ac.nz
http://en.wikipedia.org

No comments:

Post a Comment