Subject: Re: Difference between LISP and C++
From: Erik Naggum <>
Date: 24 Oct 2002 03:46:40 +0000
Newsgroups: comp.lang.lisp
Message-ID: <>

* arien <spammers_suck@getlost.invalid>
| I'm using LispWorks. Yes, the editor helps, but it's still can be
| confusing. Initially I kept putting the last bracket for 'cond' in the
| wrong spot, for example:
| (defun myFunction (myList)
| 	(cond ((listp myList)
| 	        (myfunction (cdr (myList))))
| 	(t nil))) ;I would put the closing bracket for cond here
| instead of:
| (defun myFunction (myList)
| 	(cond ((listp myList)
| 	        (myfunction (cdr (myList)))));instead of here
| 	(t nil))
| I've learnt this one now. But as you can see, an editor doesn't help you
| find this problem, since all the parentheses are there, but one is in the
| wrong spot.

  An editor would help you understand the indentation, but this is an
  interesting case since the correct code would look like this:

(defun some-function (list)
  (cond ((listp list) (some-function (cdr list)))
        (t nil)))

  Common Lisp code is very easy to write correctly when you figure out the
  indentation that the editor does for you.  Do not fight the indentation,
  no matter what you think about it.  If you think you know better, forget
  it, you do not.

| I've never seen emacs. Is it free, can I download it?

  It would only confuse you at this juncture and derail you from getting
  your assignments done in time.  People who do not want to stay for the
  duration of the learning curve, and you have certainly given me the
  impression that you would not do that, have been known to pester and
  plague the Emacs community with their prejudice and preordained knowledge
  about how editing should have been done.

| This is part of the code for the last assignment I did. This part of the
| program is not the requirements for the final practical, since someone in
| another thread ("hi, I am trying to make some code that does this") asked
| how to get the identical prac working. I'm not about to post my code for
| this fella.

  So incredibly egoistic.  So /inviting/ for people to help you out.

| So there ya go. It's all fixed now, but this is an example of the grief I
| went through.

  Why is this grief that you are going through so important that you want
  to share with the whole entire world?

  BTW, you should go rent «The Big Kahuna» with Kevin Spacey and Danny
  DeVito, who both do excellent character development in this masterpiece.
  Hell, buy it!  It is that good.

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.