Fern   davin.50webs.com
New Zealanders making it harder to hate computers

    Main Menu     Research Projects      Photo Album      Curriculum Vitae   Greatest Artists  
  Email Address   Computer Games       Web Design          Programming         Other Links     
Debugging Macros String Class I Linked List System I Java for C Programmers Naming Convention
String Class II How I use m4 Strings III Symmetrical I/O Linked List System II
Run-Time Type Info Virtual Methods An Array System Science & Religion Submodes
Nested Packages Memory Leaks Garbage Collection Internet & Poverty What is Knowledge?
Limits of Evolution Emacs Additions Function Plotter Romantic Love The Next Big Thing
Science Fiction Faster Compilation Theory of Morality Elisp Scoping Elisp Advice
SOGM Pattern Safe Properties School Bullying Charisma Control Life and Death
Splitting Java Multiple Ctors My Beliefs Conversation 1 Conversation 2
SJS Lisp++ Computer Tutorials


A new programming language called Lisp++

Under Construction
This page is under construction.

Abstract

While spending seven months writing a computer game called R4 (Rocketman) in C++ I ran into some problems with the C++ language. From the lessons learnt from writing this large (approximately 25,000 lines of code) program I have worked out how to eliminate these problems with the C++/Java languages by merging the best of C++/Java with the best of Lisp to produce a new language which I will call The Lisp++ Programming Language (at the risk of confusion with an unrelated software package called Lisp++) that as its name suggests combines the expressiveness of Lisp with the efficiency of C++.

1. Problems with C++ and Java

2. How Lisp++ works

Lisp++ code resembles Lisp code. In Lisp++, the Emacs editor is used as a Lisp interpreter which compiles Lisp++ code into C++ code. Then the G++ compiler is used to compile C++ code into machine language code. If it is desired to have source level debugging then a Lisp++ interpreter could be written to achieve this feature. The basis of the Lisp interpreter is a new Lisp function which I will call compile that takes one argument, a Lisp-style progn. Here is an example of a call to this function:

(compile '(function f (void) (let ((int x = 0))
                               foo (123 * 456 , hello)
                               bar (123 , (456 + 789) , abc))))
which compiles to the following C++ code:
void foo()
{
   int x = 0;
   foo(123 * 456,hello);
   bar(123,456 + 789, abc);
}
The following features of G++ will be useful in creating Lisp++:
Back to Research Projects
| Main Menu | Research Projects | Photo Album | Curriculum Vitae | Greatest Artists |
| Email Address | Computer Games | Web Design | Programming | Other Links |
| Debugging Macros | String Class I | Linked List System I | Java for C Programmers | Naming Convention |
| String Class II | How I use m4 | Strings III | Symmetrical I/O | Linked List System II |
| Run-Time Type Info | Virtual Methods | An Array System | Science & Religion | Submodes |
| Nested Packages | Memory Leaks | Garbage Collection | Internet & Poverty | What is Knowledge? |
| Limits of Evolution | Emacs Additions | Function Plotter | Romantic Love | The Next Big Thing |
| Science Fiction | Faster Compilation | Theory of Morality | Elisp Scoping | Elisp Advice |
| SOGM Pattern | Safe Properties | School Bullying | Charisma Control | Life and Death |
| Splitting Java | Multiple Ctors | My Beliefs | Conversation 1 | Conversation 2 |
| SJS | Lisp++ | Computer Tutorials |

Please report any broken links to the webperson
Last modified: Tue May 12 13:44:30 NZST 2009
© Copyright 1999-2009 Davin Pearson.