Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Difference between LISP and C++
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 251 - 275 of 722 - Collapse all  -  Translate all to Translated (View all originals) < Older  Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Thomas Stegen  
View profile  
 More options Oct 24 2002, 1:52 pm
Newsgroups: comp.lang.lisp
From: Thomas Stegen <tste...@cis.strath.ac.uk>
Date: Thu, 24 Oct 2002 17:12:25 +0200
Local: Thurs, Oct 24 2002 11:12 am
Subject: Re: Difference between LISP and C++

arien wrote:
> wow, you are weird. What an insulting reply.

You should listen to mr. Naggum. Once you dig past the insults
you will not only realize that he is worth listening to but also
that insults are only in your head.

In my frst encounter with Erik I made the same mistakes as you do
now. When I got that episode in perspective I learned quite a lot
about quite a few things. Erik was certainly not the only reason for
this, but he was an important catalyst.

--
Thomas.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johan Kullstam  
View profile  
 More options Oct 24 2002, 1:55 pm
Newsgroups: comp.lang.lisp
From: Johan Kullstam <kullstj...@attbi.com>
Date: 24 Oct 2002 13:55:42 -0400
Local: Thurs, Oct 24 2002 1:55 pm
Subject: Re: Difference between LISP and C++

Look, you will not alter Erik.  Others have tried and he remains
Erik.  You must learn to deal with his presence in this newsgroup.

Hints --

* If you do not want Erik to respond to your posts, do not respond to
  him.  Erik *never* as far as i've seen follows up his own posts to
  heap more invective.  Just let it die.  You man say, "but then Erik
  wins!"  So what.  We *all* win by letting this stuff just end.

  If you can't help but answer, just killfile him already.  Don't talk
  about it.  Not to be harsh, but no one else cares.

* Erik has a lot of insight into complex problems.  Ask a technical
  question which you have done some research on (at a minimum look to
  the common lisp hyperspec) and Erik may respond with a very useful
  answer.

* It is also useful just to lurk and read what is going on here.
  There are a lot of very good programmers with years of experience.
  You can learn from them.

* Think about how you ask a question.  Try to find out a bit on your
  own.  Ask humbly, but there's no need to grovel -- i.e., say "I saw
  this but it doens't make sense to me, is this how it should work?"
  instead of "This lanugage is pants because X does it some other
  way."  Lisp does a lot of things differently than other languages.
  Many times there is a very good reason for that.

--
Johan KULLSTAM <kullstj...@attbi.com> sysengr


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brady Montz  
View profile  
 More options Oct 24 2002, 1:56 pm
Newsgroups: comp.lang.lisp
From: Brady Montz <bra...@balestra.org>
Date: 24 Oct 2002 10:56:10 -0700
Local: Thurs, Oct 24 2002 1:56 pm
Subject: Re: Difference between LISP and C++

Doesn't sound like lisp bashing to me either. Just the expected
frustations of someone hitting some new irritant. And the mere fact
that every language has them doesn't make lisp's less irritating.

Seems to me you've got a reasonable awareness of the learning curve,
so I think you'll do fine. You said this class was more using lisp
than teaching it? If so, you're doing the right thing seeking out some
extra info sources. With some perserverence, you'll progess from "why
is this 100 line program so HARD???" to "I can't believe how much I
can do with 100 lines" to "woo hoo!" to "Please don't make me write
this in C++!" in no time.

--
 Brady Montz
 bra...@balestra.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pekka P. Pirinen  
View profile  
 More options Oct 24 2002, 2:30 pm
Newsgroups: comp.lang.lisp
From: Pekka.P.Piri...@globalgraphics.com (Pekka P. Pirinen)
Date: 24 Oct 2002 19:18:56 +0100
Local: Thurs, Oct 24 2002 2:18 pm
Subject: Re: Difference between LISP and C++
(I'd much rather email this, but you don't provide an email address.)

It's best just to ignore Erik Naggum.  You'll be sucked into a mire of
hostility if you argue with him.

If you feel you need to prove your good intentions, the best way is to
continue constructive discussion, not to argue the (mis)interpretation
of your earlier posts with people who don't respect you.
--
Pekka P. Pirinen
If you don't succeed at first, try again.  Then quit.  No use of being a
damn fool about it.  - W. C. Fields


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Len Charest  
View profile  
 More options Oct 24 2002, 2:56 pm
Newsgroups: comp.lang.lisp
From: Len Charest <no.em...@my.inbox>
Date: Thu, 24 Oct 2002 11:02:20 -0700
Local: Thurs, Oct 24 2002 2:02 pm
Subject: Re: Difference between LISP and C++

arien wrote:
> I don't understand why you guys are all so
> defensive of Lisp.

We're not as a whole.

Naggum is the resident sociopath here. He is to be used for
entertainment purposes only. Please, no wagering...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob Warnock  
View profile  
 More options Oct 24 2002, 3:12 pm
Newsgroups: comp.lang.lisp
From: r...@rpw3.org (Rob Warnock)
Date: Thu, 24 Oct 2002 14:12:12 -0500
Local: Thurs, Oct 24 2002 3:12 pm
Subject: Re: Difference between LISP and C++
Tim Bradshaw  <t...@cley.com> wrote:
+---------------
|    <name attributes>body</name>
|
| Well, let's ignore the attributes bit for now (it's clear that you
| could do this, by requiring attributes to be specified as some initial
| element in the body, and you can also actually add the attributes to a
| Lisp syntax if you want).
+---------------

That's one way to think of Lisp documentation strings and declarations,
actually, as attributes of the expression they're attached to!!

-Rob

-----
Rob Warnock, PP-ASEL-IA         <r...@rpw3.org>
627 26th Avenue                 <URL:http://www.rpw3.org/>
San Mateo, CA 94403             (650)572-2607


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johan Kullstam  
View profile  
 More options Oct 24 2002, 3:23 pm
Newsgroups: comp.lang.lisp
From: Johan Kullstam <kullstj...@attbi.com>
Date: Thu, 24 Oct 2002 19:23:43 GMT
Local: Thurs, Oct 24 2002 3:23 pm
Subject: Re: Difference between LISP and C++

This is true.  I was baffled by how to find the error line.  Learning
lisp for me is as much about unlearning habits and techniques of other
languages as it is in learning lisp.

Here is my way of dealing with this.

Make smallish functions and use the link between your editor and the
running lisp environment.  In emacs with ilisp, I go to the end of a
defun and hit C-c C-e.  This executes the defun and when the compiler
complains there are only a few lines which are in play.  It is then
*much* easier to find the error.

--
Johan KULLSTAM


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Will Deakin  
View profile  
 More options Oct 24 2002, 3:35 pm
Newsgroups: comp.lang.lisp
From: Will Deakin <anisotro...@hotmail.com>
Date: Thu, 24 Oct 2002 19:34:07 +0000 (UTC)
Local: Thurs, Oct 24 2002 3:34 pm
Subject: Re: Difference between LISP and C++
Johan Kullstam wrote:
> Make smallish functions and use the link between your editor and the
> running lisp environment.  In emacs with ilisp, I go to the end of a
> defun and hit C-c C-e.  This executes the defun and when the compiler
> complains there are only a few lines which are in play.  It is then
> *much* easier to find the error.

FWIW I use xemacs. However, I tend to put stuff in a xemacs buffer,
compile the blessed thing and then M-x goto-char <nnn> at the whinge point.

:)w


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Oct 24 2002, 3:49 pm
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 24 Oct 2002 19:48:59 +0000
Local: Thurs, Oct 24 2002 3:48 pm
Subject: Re: Difference between LISP and C++
* Pekka P. Pirinen
| It's best just to ignore Erik Naggum.  You'll be sucked into a mire of
| hostility if you argue with him.

  People who make this argument say something about themselves that smarter
  people than them know well how to interpret.

  The arrogance of people who confuse their opinions with facts is one of
  the things I attack.  You demonstrate quite clearly that there is useful
  distinction between your conclusions and observable reality.  Therefore,
  you are never wrong in your own view, and anyone who counters your claims
  is wrong at best, irrational at worst.  For people who have acquired the
  insight that their conclusions are not identical to reality, but based on
  their limited understanding of a limited part of it at the time, the
  ability to learn from their mistakes follow naturally, as well as their
  ability to deal with people who have observed more or different parts of
  reality than they have.  You clearly lack the prerequisite insight.  This
  has been obvious for years from the snotty remarks you make when you
  think you know the only possible answer and your silence when it becomes
  clear that it was far from the only possible answer.

  People who have learned how to think discover others who share this joy
  and tend to be annoyed with people who have never acquired that skill and
  especially those who consider themselves superior /because/ they believe
  they do not "have to" think, which they consider a dirty practice of
  people who do not automatically know the Truth, like they do.  Pekka P.
  Pirinen has come across as that kind of arrogant ignorant asshole far too
  long to have gone unnoticed as such by those who are /not/ so incredibly
  happy to have found the first answer that they never look any further.

  If you know what you talk about, I listen.  If you do not, and you do not
  listen, either, I may be scathing of your stupidity, because you should
  know better.  Some people never understand what they have done wrong,
  however, because they believe that listening to other people is a waste
  of their valuable time, especially when they prefer their prejudices to
  learning something that may cause them to feel as ignorant as they are.

  Pekka P. Pirinen is one of those lucky men who cannot be taught anything.
  Sadly, he only finds it worth his time to share of his infinite wisdom
  when he can hurt someone with it.  This is the main reason he gets into a
  mire of hostility, like the defectiveness of "Mel" got her into trouble.

  The most tragic part of all is that people like Pekka and "Mel" actually
  believe they are perfect and models for all the rest of mankind and then
  it could not possibly matter to them how evil they are towards others.

--
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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Oct 24 2002, 3:50 pm
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 24 Oct 2002 19:50:37 +0000
Local: Thurs, Oct 24 2002 3:50 pm
Subject: Re: Difference between LISP and C++
* Len Charest <no.em...@my.inbox>
| Naggum is the resident sociopath here. He is to be used for entertainment
| purposes only. Please, no wagering...

  What on earth possesses a person when he can make such comments about
  other people?  "Sociopath" sure comes to mind as a possible explanation.

--
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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Lewerin  
View profile  
 More options Oct 24 2002, 4:23 pm
Newsgroups: comp.lang.lisp
From: Peter Lewerin <peter.lewe...@swipnet.se>
Date: Thu, 24 Oct 2002 22:21:11 +0200
Local: Thurs, Oct 24 2002 4:21 pm
Subject: Re: Difference between LISP and C++

>>You gotta admit, there's not many Mel's around that are male.
> It's a fairly ambigous nickname, I think.

I don't think so.  Checking on the IMDb, I found 158 male Mel actors as
opposed to 13 female.  Sure seems like a reasonably safe assumption that
a random Mel is male.

And don't forget <URL:
http://www.tuxedo.org/~esr/jargon/html/The-Story-of-Mel.html>...

--
Nobody expects the Swedish Inquisition!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Sullivan  
View profile  
 More options Oct 24 2002, 4:25 pm
Newsgroups: comp.lang.lisp
From: mich...@bcect.com (Michael Sullivan)
Date: Thu, 24 Oct 2002 15:58:36 -0400
Local: Thurs, Oct 24 2002 3:58 pm
Subject: Re: Difference between LISP and C++

arien <spammers_s...@getlost.invalid> wrote:
> In article <87fzuwecaq....@darkstar.cartan>, n...@cartan.de says...
> > arien <spammers_s...@getlost.invalid> writes:
> > > I detest people who categorise people on the internet.
> > Hm -- why?  And why specifically on the internet?  Ah, never
> > mind...
> your not female, so I guess you'd never understand.

I never realized irony meters could explode in technical newsgroups
until I met comp.lang.lisp.  I've long since stopped exposing them in
soc and talk...

Michael, learn something new every day.

--
Michael Sullivan
Business Card Express of CT             Thermographers to the Trade
Cheshire, CT                                      mich...@bcect.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kenny Tilton  
View profile  
 More options Oct 24 2002, 4:25 pm
Newsgroups: comp.lang.lisp
From: Kenny Tilton <ktil...@nyc.rr.com>
Date: Thu, 24 Oct 2002 20:24:45 GMT
Local: Thurs, Oct 24 2002 4:24 pm
Subject: Re: Difference between LISP and C++

Erik Naggum wrote:
>   Now, where are all the feel-good jerks with their positive reinforcers?

Carrying on a civil dialog with Mel in other subthreads. Meanwhile, this
flaming subthread is hardly a triumph for the blunt approach.

--

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
Manners must adorn knowledge, and smooth its way through the world.
                                           -- Philip Dormer Stanhope


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Oct 24 2002, 4:38 pm
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 24 Oct 2002 20:38:34 +0000
Local: Thurs, Oct 24 2002 4:38 pm
Subject: Re: Difference between LISP and C++
* Kenny Tilton <ktil...@nyc.rr.com>
| Carrying on a civil dialog with Mel in other subthreads.

  Are you quite sure of that?  What are you talking about?

| Meanwhile, this flaming subthread is hardly a triumph for the blunt
| approach.

  Oh, christ.

--
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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Len Charest  
View profile  
 More options Oct 24 2002, 4:55 pm
Newsgroups: comp.lang.lisp
From: Len Charest <no.em...@my.inbox>
Date: Thu, 24 Oct 2002 12:59:46 -0700
Local: Thurs, Oct 24 2002 3:59 pm
Subject: Re: Difference between LISP and C++

Erik Naggum wrote:
> * Len Charest <no.em...@my.inbox>
> | Naggum is the resident sociopath here. He is to be used for entertainment
> | purposes only. Please, no wagering...

>   What on earth possesses a person when he can make such comments about
>   other people?  

The hi-larious presence of a sociopath.

 > "Sociopath" sure comes to mind as a possible explanation.

I know you are, but what am I?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruce Hoult  
View profile  
 More options Oct 24 2002, 5:46 pm
Newsgroups: comp.lang.lisp
From: Bruce Hoult <br...@hoult.org>
Date: Fri, 25 Oct 2002 10:46:13 +1300
Local: Thurs, Oct 24 2002 5:46 pm
Subject: Re: Difference between LISP and C++
In article <ey3n0p4ceht....@cley.com>, Tim Bradshaw <t...@cley.com>
wrote:

> * spammers suck wrote:

> > You gotta admit, there's not many Mel's around that are male.

> I don't know.  Mel Brooks, Mel Gibson, Mel
> who-was-in-not-the-nine-o-clock-news-but-I-can't-remember-his-name.

An unusual one.  Think "Alas Smith and Jones"...

-- Bruce


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Lewerin  
View profile  
 More options Oct 24 2002, 5:51 pm
Newsgroups: comp.lang.lisp
From: Peter Lewerin <peter.lewe...@swipnet.se>
Date: Thu, 24 Oct 2002 23:49:14 +0200
Local: Thurs, Oct 24 2002 5:49 pm
Subject: Re: Difference between LISP and C++

> I don't think so.  Checking on the IMDb, I found 158 male Mel actors as
> opposed to 13 female.  Sure seems like a reasonably safe assumption that
> a random Mel is male.

Ooops, forgot to compensate for uneven gender distribution.  There are
415,361 actors on IMDb, and only 251,821 actresses.  Assuming that this
population is representative, about one Mel in 8 should be female.

--
Nobody expects the Swedish Inquisition!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Stegen  
View profile  
 More options Oct 24 2002, 6:36 pm
Newsgroups: comp.lang.lisp
From: Thomas Stegen <tste...@cis.strath.ac.uk>
Date: Thu, 24 Oct 2002 23:31:12 +0200
Local: Thurs, Oct 24 2002 5:31 pm
Subject: Re: Difference between LISP and C++

Len Charest wrote:
> I know you are, but what am I?

You are acting like a fucking fool.

--
Thomas.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Len Charest  
View profile  
 More options Oct 24 2002, 7:57 pm
Newsgroups: comp.lang.lisp
From: Len Charest <no.em...@my.inbox>
Date: Thu, 24 Oct 2002 16:28:18 -0700
Local: Thurs, Oct 24 2002 7:28 pm
Subject: Re: Difference between LISP and C++

Thomas Stegen wrote:

> You are acting like a fucking fool.

You are acting like a large-mouth bass with a shiny steel hook in your
cheek.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Petr Swedock  
View profile  
 More options Oct 24 2002, 7:57 pm
Newsgroups: comp.lang.lisp
From: Petr Swedock <p...@blade-runner.mit.edu>
Date: 24 Oct 2002 20:01:35 -0400
Local: Thurs, Oct 24 2002 8:01 pm
Subject: Re: Difference between LISP and C++

Tim Bradshaw <t...@cley.com> writes:

   ;; * spammers suck wrote:
   ;;
   ;; > You gotta admit, there's not many Mel's around that are male.
   ;;
   ;; I don't know.  Mel Brooks, Mel Gibson, Mel
   ;; who-was-in-not-the-nine-o-clock-news-but-I-can't-remember-his-name.
   ;;
   ;; It's a fairly ambigous nickname, I think.

I imagine that Mel can be short for Melvin, for a male, and
Melanie for a female.

Peace,

Petr


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Larry Clapp  
View profile  
 More options Oct 24 2002, 9:58 pm
Newsgroups: comp.lang.lisp
From: Larry Clapp <la...@theclapp.org>
Date: 25 Oct 2002 01:58:29 GMT
Local: Thurs, Oct 24 2002 9:58 pm
Subject: Re: Difference between LISP and C++
In article <ey3elagc8bz....@cley.com>, Tim Bradshaw wrote:

<a really well-written answer to the question "Why all the silly
parentheses"? that newbies incessantly ask>

I think from now on we[1] should point to Tim's article whenever
anyone asks The Standard Clueless Newbie Question (TSCNQ).

Thanks, Tim, for crystalizing so well some vague intuitions I'd
absorbed from the Lisp books & work I've done so far.

-- Larry

[1] Okay, I mostly lurk here, so I suppose I should say "you". :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Palmer  
View profile  
 More options Oct 24 2002, 10:50 pm
Newsgroups: comp.lang.lisp
From: Brian Palmer <br...@invalid.dom>
Date: Fri, 25 Oct 2002 02:50:32 GMT
Local: Thurs, Oct 24 2002 10:50 pm
Subject: Re: Difference between LISP and C++

arien wrote:

> If you can't post something helpful, well, I guess killfile will work.
> Consider this only a warning. Any more abusive posts, and you'll be
> kill-filed.

Wow, here we see a wonderful example of the Usenet-equivalent of not
liking someone else in the sandbox and covering your ears and shouting
"La la la la... I can't hear you... la la la la".  You may be a mature
student (according to New Zealand standards, if such a thing exists),
but your actions are anything but mature.

On a bright note, I found a definition of "arien" which wholly applies
to you:

   "The word 'humility' will not be found in their lexicon. In their
    climb to power, some will ruthlessly liquidate anyone who stands
    in their way. Such undeveloped Ariens put 'self' first and foremost
    and not a few become megalomaniacs."

Putting "self" first... well, that just about explains everything now
doesn't it?  Very apt choice of monikers, I must say.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas A. Russ  
View profile  
 More options Oct 24 2002, 11:45 pm
Newsgroups: comp.lang.lisp
From: t...@sevak.isi.edu (Thomas A. Russ)
Date: 24 Oct 2002 14:16:30 -0700
Local: Thurs, Oct 24 2002 5:16 pm
Subject: Re: Difference between LISP and C++

Two observations.  The first one is that your first function above is
the correct one.  The second function has the incorrect location.  It
seems that they are labeled the other way around in your example.

The second observation is that you are not letting your editor do the
indentation for you.  You have to let the tools help.  If you were to
use an editor with proper indenting of code (I'm not familiar with the
LispWorks editor), you would have seen:

[1]  (defun myFunction (myList)
       (cond ((listp myList)
              (myfunction (cdr (myList))))
             (t nil)))

[2]  (defun myFunction (myList)
       (cond ((listp myList)
              (myfunction (cdr (myList)))))
       (t nil))

In example [1], all of the test clauses of the COND are aligned
underneath each other.  That is the correct version, since you want the
LISTP test and the T test to be at the same level.  In example [2], you
can easily see the error, since the T is at the same level as the COND.

You get the same effect with other languages, such as Java.  It is not
always immediately obvious where things are missing in Java unless you
follow the normal line breaking and indentation conventions either:

       a = 3*b+1001
       c = 5*a;

versus

        a = 3*b+1001 c = 5*a;

In the latter case, Notepad won't help you find the missing semi-colon
because it is missing from the middle of the line.  Now you probably
wouldn't write your Java or C code like this.  Nor should you write Lisp
code without respecting the structure of the program.  The IDEs for
Java, etc. also indent your code, which is invaluable for finding the
misplaced } characters in complicated code, particularly if you have a
lot of conditionals and error handlers.  This may not be so apparent
when doing school assignments, but in real code it gets to be an issue.

By the way, I just took the code from your message and indented it using
Emacs.  There was an observation made in a related parenthesis-bashing
thread a couple months ago that with experience, you end up not focusing
so much on the parentheses, but rather on the indentation structure.
That is why tools help so much.

Well, I think you drew the wrong conclusion here.  The correct
conclusion would have been perhaps not to use global variables.  That is
why the language has the nice construct LET.  Now, many other languages
(such as Java, etc.) will not let you use variables that you haven't
declared.  Lisp doesn't always provide the same degree of hand-holding,
but the same general principles apply.

The second conclusion is to not use variables that you haven't
initialized, but again this is a universal programming truth.

You shouldn't use global variables unless you have very carefully
thought it out, since they open the way for bizarre interactions between
code that is not textually close together.  In some cases it is
expedient to use special variables, but you really shouldn't make them
truly global.  At the top-level of the program section that wishes to
use these variables, they should be bound to a value that you like
(again using LET).  An example:

 (let ((*glist* nil))
   (declare (special *glist*))
   ....
  )

Note also that because of the non-local interaction, most Lisp
programmers have adopted the convention of surrounding their special
variable names with "*" characters.  It signals that one has a variable
with dynamic rather than lexical scope, and makes it easier to
understand the code.

To preempt the question about the lack of hand-holding, one benefit of
it is that it can be quite handy not to have those restrictions during
the early, exploratory phase of program design.  Lisp makes exploratory
programming and debugging much easier by having a lot of flexibility and
access to the code.  The down side is that this flexibility can end up
biting you.

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

OK.  But as long as you learn the correct lesssons, the grief is at
least not wasted.

 --
Thomas A. Russ,  USC/Information Sciences Institute          t...@isi.edu    

  It is a poor carpenter who blames his tools.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vassil Nikolov  
View profile  
 More options Oct 25 2002, 12:38 am
Newsgroups: comp.lang.lisp
From: Vassil Nikolov <vniko...@poboxes.com>
Date: 25 Oct 2002 00:34:09 -0400
Local: Fri, Oct 25 2002 12:34 am
Subject: Re: Difference between LISP and C++
    On 24 Oct 2002 20:01:35 -0400, Petr Swedock <p...@blade-runner.mit.edu> said:

    PS> I imagine that Mel can be short for Melvin, for a male, and
    PS> Melanie for a female.

Also, mel means honey.

---Vassil.

--
Non-googlable is googlable.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christopher Browne  
View profile  
 More options Oct 25 2002, 1:06 am
Newsgroups: comp.lang.lisp
From: Christopher Browne <cbbro...@acm.org>
Date: 25 Oct 2002 05:06:34 GMT
Local: Fri, Oct 25 2002 1:06 am
Subject: Re: Difference between LISP and C++
In an attempt to throw the authorities off his trail, Vassil Nikolov <vniko...@poboxes.com> transmitted:

>     On 24 Oct 2002 20:01:35 -0400, Petr Swedock
>     <p...@blade-runner.mit.edu> said:

>     PS> I imagine that Mel can be short for Melvin, for a male, and
>     PS> Melanie for a female.

> Also, mel means honey.

????  Isn't that "miel"?  It's certainly not something that the
typical "unilingual English (USian or perhaps British) bigot" would
think of...

I'd expect "Mel" to be far more widely used as a male name than as a
female name because "Melvin" is a name that tends to attract
sophomoric ridicule, whereas "Melanie" doesn't.

Kids have been using the insult "He's a Total Melvin" for at least 30
years.  (I've been a recipient of something of the sort a few times.)
That's a good excuse for seeking a name change, in much the way that a
guy called "Gaylord" might well consider suicide...

I've never heard "Melanie" used as an insult...
--
(reverse (concatenate 'string "ac.notelrac.teneerf@" "454aa"))
http://www.ntlug.org/~cbbrowne/rdbms.html
Why do you need a driver's  license to buy liquor when you can't drink
and drive?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 251 - 275 of 722 < Older  Newer >
« Back to Discussions « Newer topic     Older topic »