Subject: Re: Lisp versus C++ for AI. software From: Erik Naggum <firstname.lastname@example.org> Date: 1996/10/16 Newsgroups: comp.lang.lisp,comp.lang.c++ Message-ID: <email@example.com> * Mukesh Prasad <firstname.lastname@example.org> | I would have to disagree. on what basis do you make conclusions about Emacs? do you know the code intimately? well, I do. | The C code for byte code interpreting is small compared to the rest of | the emacs C code. ahem, the issue was the Lisp machine, not the byte code interpreter. if you insist on being silly and twisting people's words, do not expect to be respected. what distinguishes a C program from a Lisp program? first of all, it has functions defined in a C-like fashion, and makes function calls in the normal C way. in Emacs, 90% of the C code consists of Lisp-like C-code and Lisp-like calls to such functions. second, if a C program contains assembly code for efficiency, it is no less a C program -- it just has some sections of itself that are hand-compiled because that would speed things up or do something that is hard to do in C. (and believe you me, C is _not_ the all-purpose language it is believed to be.) 90% of the C code in Emacs is effectively hand-compiled Lisp. how can I say that? because I'm working on an Emacs Lisp to C compiler for these things, such that (1) one may write in Lisp instead of the tortous output of the imaginary compiler that exists today, and (2) one may compile functions in any package that turns out to need the speed. | Also, most of the core editor algorihtms were in C the last time I | looked. you haven't looked at all, have you, Mukesh? | Elisp provides several "facilities" and "hooks" on top, not at the core | level. Emacs is written in Emacs Lisp. the display system and the Lisp machine is written in C for two reasons: (1) speed, and (2) portability, respectively. | Though I am sure rms placed as much functionality in Lisp as he felt he | reasonably could. it is better to say that as little of the functionality is in C as possible because it sacrifices (1) readability, and the purpose of free software is to make people able to learn from other programmers, (2) flexibility, as it takes much more effort to be flexible in C than in Lisp. (note that XEmacs goes the other way: with more and more code hidden in impenetrable C code with "abstract types" implemented solely in C and used only by Lisp through an "API". one _might_ say that Emacs is written in Lisp because its programmers think in Lisp, whereas XEmacs is written in C because its programmers think in C.) #\Erik -- I could tell you, but then I would have to reboot you.