Subject: Re: Difference between LISP and C++
From: Erik Naggum <>
Date: 10 Oct 2002 23:48:28 +0000
Newsgroups: comp.lang.lisp
Message-ID: <>

* arien <spammers_suck@getlost.invalid>
| What I still find hard to grasp, is normally when you distribute a
| program, you distribute the executables.

  But executables do not live in a void.  You cannot get an executable that
  runs under Windows and Linux despite running on the same hardware once
  booted with the appropriate system, or on the Wintendo platform and on
  the Solaris platform despite being written in languages available on
  both.  There is a persistent myth about "standalone" executables that is
  fairly strongly counter-indicated by incompatible operating systems, and
  in the C++ world, you even need the exact same compiler to make things
  work with distributed shared libraries.  (One version of the semipopular
  DeadRat Linux distribution actually used a very particular version of gcc
  that did funny things so that you could not compile C++ programs on other
  Linux systems and have them run on DeadRat systems.)  So you cannot just
  distribute executables.  It is a myth.  Better shed it now or hurt later.

| So how would you distribute a program created in Lisp?

  You distribute something that will run in the environment your users have
  already installed, possibly mere minutes prior to installing your program
  in whatever form they may take.  This is really a non-issue.  If you ask
  whether a Common Lisp program can run on the bare metal, the answer is
  No.  If you ask whether it can run with only "standard" libraries, you
  have to compare that with other languages, and you will find that Common
  Lisp is no different from any other language in this regard: No.  To be
  able to run with only operating-system-supplied shared libraries, your
  program really has to be part of that operating system.  Some Unix and
  Windows programs have that function.  It is not common to write "hello,
  world" programs in Common Lisp like it is in C/C++ and Common Lisp
  environments are therefore not optimized very heavily for this task.

| Also, as I asked in another post above, can lisp create a UI?

  Well, we have not quite developed our artificial intelligence systems
  that far, yet.  You still need a programmer to create a user interface.
  If the Common Lisp programmer is well versed in user interfaces, then he
  would use Common Lisp to create the user interface, too.  Please note
  that several of the Common Lisp environments include interface builders
  that alleviate some of the tedium of writing user interfaces.  Those who
  like that kind of thing will find them the kind of thing they like.

| Or would you use something like C++ for the UI, and then that runs the
| lisp code?

  Java has positioned itself as very useful tool in this regard.  People
  have also found HTML and web pages to be a convenient vehicle.

| Lastly, I show some sample lisp code, that I had written, to a friend and
| he responded that it looked like a Low Level Lanuage.  Could someone tell
| me 1) if this is true, and 2) The difference between High Level and Low
| Level languages?

  I think you should ask yourself why you trust your friend's opinion and
  ask him what he means by it.  You could, for instance, have written very
  low-level code and your friend may have been polite about who is to blame
  for that.  Some people here think that being polite is all the rage, but
  I am not generally of that opinion as it tends to make people believe
  they have not made serious mistakes even when the intended message is
  that they have.

Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.