I'm not much of a programmer, and i've only learned C++ so far
I want to ask, what's the pro's and con's of C++ and LISP compared?
and please provide a example of a program in C++ and LISP with the same function
this has nth to do with homework = =
i just want to know
Name:
Anonymous2005-11-10 8:52
They're very different. LISP has a diferent programming paradigm (function programming), which has greater differences than procedural and object oriented programming have. LISP looks like a curious language to learn, although (and I know I'll be bashed for this, but I'm Anonymous and Anonymous is used to), I don't see too much of an use for it outside A.I.
BTW, you learnt C++ as your first language? I don't know if that was a good choice. Can you deal with C alone too?
Name:
Anonymous2005-11-10 14:09
>>4
well, to be more exact, PHP was m first programming language
And i asked this question because i want to do research on A.I., and wanted to know why LISP is the most used in that field
Name:
Anonymous2005-11-10 15:13
i want to do research on A.I.
Don't mind me while I snicker in the corner.
Also, Lisp and Prolog are both popular in AI because of symbolic computation.
Name:
Anonymous2005-11-10 15:56
need more neural networks amirite
Name:
Anonymous2005-11-10 16:10
>>4
A practical LISP, like Common Lisp, has lots of uses in the real world. While it's not the language to use for low-level stuff (that's what C is for), it is truly excellent for application-level programming.
The only things application-level C++ and Java do better are libraries. LISP doesn't have a huge community behind it anymore, and the amount of libraries is somewhat small. Still, it is possible to use the Foreign Function Interface.
LISP is probably popular with AI partly because of it's lack of distinction between data and code. Data IS code. Data can be executed and compiled as code both "compile-time" and "run-time", though the difference between them is kinda artificial in LISP.
Name:
Anonymous2005-11-10 17:31
One interesting feature of Lisp with respect to AI research is the way you can make an evolutionary growth of programs. Because of the functional naure of lisp, it's quite easy to describe a lisp program as a tree with nodes as functions and children as parameters. A population of these programs can trade subtrees in an evolutionary manner to create new "child" programs that will attempt to solve a problem in a manner combining both of its parents. I've done some and seen more research using lisp in such a manner, and it's really quite elegant. Lots of fun. :)
Name:
Anonymous2005-11-10 20:50
Because of the functional naure of lisp, it's quite easy to describe a lisp program as a tree with nodes as functions and children as parameters.
no. it is not because of the functional nature of lisp. functions as nodes and children as parameters is independant of whether a language is functional or not. a lot of functional languages does not do that, especially static typed ones.
btw. functions as nodes and params as children is like the basic nature of lisp and without it lisp wouldn't be lisp. so you shouldn't describe it like a feature or anything.
The functional nature of list makes it "quite easy to describe..." Vastly easier than in any procedural or logical or OO language. The syntax is ridiculously simple to parse into a tree compared to something like C or Fortran. Thus, convenient and quite easy. And that's all I'm going to say about that b/c you're clearly trolling.
It only makes sense that the fundamental nature of a language would be describable as a beneficial *feature* of the language. I can't count how many times I've heard people say that the multi-paradigm approach of OCaml, something that's very fundamental to the language, is a great feature. And they're right, it is.
Stop trolling.
Name:
Anonymous2005-11-11 7:45 (sage)
>>12
One of the most recurring themes in trolling is accusing others of trolling to confuse the issue of who is trolling and who is contributing.
Name:
Anonymous2005-11-11 8:36 (sage)
>>13 is either a genius meta-meta-troll, or speaks great truth.
Name:
xiajia2005-12-01 22:17
hello everybody,i want to make some friends in the field of c/c++/VC++,and improve my English.you can get some sourse codes at http://blog.csdn.net/xiajia
my Email:xiajia_1981@163.com