top of page
Writer's pictureThe Tech Platform

Lisp Programming Language

LISP - acronym for List Processing


Lisp is the second-oldest high-level programming language after Fortran and has changed a great deal since its early days, and a number of dialects have existed over its history. Today, the most widely known general-purpose Lisp dialects are Common Lisp and Scheme.


History:

John McCarthy developed Lisp in 1958 while he was at the Massachusetts Institute of Technology (MIT). McCarthy published its design in a paper in Communications of the ACM in 1960, entitled "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I". He showed that with a few simple operators and a notation for anonymous functions borrowed from Church, one can build a Turing-complete language for algorithms.


Lisp was first implemented by Steve Russell on an IBM 704 computer using punched cards. Russell had read McCarthy's paper and realized (to McCarthy's surprise) that the Lisp eval function could be implemented in machine code. The result was a working Lisp interpreter which could be used to run Lisp programs, or more properly, "evaluate Lisp expressions".


Syntax:

LISP programs are made up of three basic building blocks −

  • atom

  • list

  • string

An atom is a number or string of contiguous characters. It includes numbers and special characters.

Following are examples of some valid atoms −

hello-from-tutorials-point
name
123008907
*hello*
Block#221
abc123

So, please create new source code file named main.lisp and type the following code in it.

(write-line "Hello World")(write-line "I am at 'Tutorials Point'! Learning LISP")

When you click the Execute button, or type Ctrl+E, LISP executes it immediately and the result returned is −

Hello World

I am at 'Tutorials Point'! Learning LISP


LISP Executer:

The source code written in source file is the human readable source for your program. It needs to be "executed", to turn into machine language so that your CPU can actually execute the program as per instructions given.


This Lisp programming language will be used to execute your source code into final executable program. I assume you have basic knowledge about a programming language.


CLISP is the GNU Common LISP multi-architechtural compiler used for setting up LISP in Windows. The windows version emulates a unix environment using MingW under windows. The installer takes care of this and automatically adds clisp to the windows PATH variable.

It creates a shortcut in the Start Menu by default, for the line-by-line interpreter.


Features:

  • It is machine-independent

  • It uses iterative design methodology, and easy extensibility.

  • It allows updating the programs dynamically.

  • It provides high level debugging.

  • It provides advanced object-oriented programming.

  • It provides a convenient macro system.

  • It provides wide-ranging data types like, objects, structures, lists, vectors, adjustable arrays, hash-tables, and symbols.

  • It is expression-based.

  • It provides an object-oriented condition system.

  • It provides a complete I/O library.

  • It provides extensive control structures.


Applications:

Large successful applications built in Lisp.

  • Emacs

  • G2

  • AutoCad

  • Igor Engraver

  • Yahoo Store


Advantages:

  • Lisp programming language empowers programmers to write programs faster. An observed study clearly shows that when programmers tackle problems in Lisp, C/C++ and Java, Lisp programs are smaller thus taking less time in development and runs faster.

  • Lisp family of programming languages makes it easy to create extensible macros which facilitate creation of extensions and plugins for their software.


Disadvantages:

  • Poor readability of the code.

  • Complex syntax to understand.

  • Poor learnability.



Source: Tutorialpoint


The Tech Platform

0 comments

Comments


bottom of page