Lisp

Started by
13 comments, last by Flatlander 18 years ago
Hello What is Lisp ? Can it be of use for game programming, maybe in combination with c\c++ ?
Advertisement
Lisp is a programming language, with the interesting property that it makes certain difficult things easy, and easy things difficult.
Thanks

May I assume that Lisp and c\c++ work well togheter ?
I mean, I can use Lisp to makes certain difficult things easy
I so, which ones ? in a game programming
Quote:Original post by AlbertoT
Thanks

May I assume that Lisp and c\c++ work well togheter ?

That depends. First of all, there are a wide variety of Lisp dialects. I'll assume you are referring to Common Lisp (a specific Lisp dialect), because that is what "Lisp" often refers to when it refers to a specific dialect. Secondly, this depends on the compiler/interpreter you use.
Quote:
I mean, I can use Lisp to makes certain difficult things easy
I so, which ones ? in a game programming

Well, he probably meant that mainly as a joke, but some things are easier to do in Common Lisp than some other languages. They are not really specifically related to a type of application though.
Abuse was a popular example of using LISP for AI and game play on top of a platform engine. See http://en.wikipedia.org/wiki/Abuse_(computer_game)
I would not recommend LISP for scripting,
and I would say it doesnt work well with C++/C because:

- It uses reverse polish notation Ie. to add 4 + 5 in lisp: (+ 4 5)
- It has no types.
- It is a functional language instead of an imperative one (like C++)

Yes, lisp does work well for certain things, such as recursion, but it can get VERY complicated VERY quickly.
Delphi C++ OpenGL Development: www.nitrogen.za.org
Quote:Original post by Nitrogen
I would not recommend LISP for scripting,

Why?
Quote:
and I would say it doesnt work well with C++/C because:

- It uses reverse polish notation Ie. to add 4 + 5 in lisp: (+ 4 5)

That is Polish notation. Also, that is not related to whether or not it works well with C++
Quote:
- It has no types.

It does indeed have types. It's just dynamically typed. And, again, this is not related to whether or not it works well with C++
Quote:
- It is a functional language instead of an imperative one (like C++)

It is imperative language. It is an impurely functional language (which basically means that it is an imperative language that has closures). The fact that is an impurely functional language will not affect how well it will work with C or C++.

Quote:
Yes, lisp does work well for certain things, such as recursion, but it can get VERY complicated VERY quickly.


Okay, I am thinking you have never actually used Lisp for a significant period of time. There are (of course) good arguments for why you would not want to use Lisp in certain cases. None of these are. And two of your points (the first and the second) are just plain wrong.
"I'll assume you are referring to Common Lisp "

I was referring to the Lisp script language used by the authoring system
"Deep Creator"
This 3d engine use a combination of Lisp and C\C++
It seems that they made this choice because their customers are already familiar with Lisp being used in AutoCad
I wonder howewer wether you can expect significant advantages, using Lisp ,for example ,for the game play or AI logic and c\c++ for othet tasks
OK, my bad, got my definitions a bit screwed! :)

What I'm trying to get across, is that in my opinion, Python or LUA would be a much better choice because it follows the same syntax as C++.

Granted I only used lisp for a year, but found I had to relearn my whole style of programming..
Not good for switching between the two..
Delphi C++ OpenGL Development: www.nitrogen.za.org
An interesting link:
Gluing Things Together - Scheme in the Real-time CG Content Production

If you want more info about lisp in game development, you might want to search for GOAL, a lisp dialect developed by Naughty Dog for their games on the PS2.

This topic is closed to new replies.

Advertisement