Lisp

BASIC, C, Pascal, and FORTRAN are in many ways quite similar. Also, programs written in these languages can be made quite readable, especially if the programmer intends to make it so. There are other languages that seem not to be readable under any circumstances. For instance, Lisp was developed in the late 1950s by John McCarthy and Marvin Minsky at MIT for the purpose of doing list processing (hence the name) in connection with artificial intelligence applications.

In Lisp, everything is a list. Here is a sample:

	; LISP sample program to define a predicate
	;       that takes two lists and returns the value
	; T (for true) if the lists are equal and F otherwise
	(DEFINE (
	        '(equal (LAMDBA (list1 list2)
	                (COND
	                ((ATOM list1) (EQ list1 list2))
	                ((ATOM list1 NIL)
	                ((equal (CAR list1) (CAR list2))
	                    (equal (CDR list1) (CDR list2)))
	                (T NIL)
	            )
	        ))
	))

This sample points out one fact. Whatever else you might think of Microsoft, we can at least thank them for choosing BASIC (VBA) as the underlying language for the Microsoft Office suite!

Get Writing Word Macros, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.