[gambit-list] newbie question: Little scheme

Adrien Piérard pierarda at iro.umontreal.ca
Sun Jan 31 09:53:23 EST 2010


>> It automatically balances parentheses for you.
> You really have to read the cheat-sheet to appreciate where it helps.

Well, who cares about software to balance brackets when, as the
initial post shows, there is no openening bracket to match and close?

I do agree with the fact that paredit is great (as are similar modes
for other editors) and that its usage should be strictly enforced, but
this is not the issue here.

What is important, though, is that the error message was correct and
wasn't cryptic :
> (atom? 'h)
*** ERROR IN atom?, "atom.scm"@3.10 -- Wrong number of arguments
passed to procedure
(not '#<procedure #2 pair?> 'h)

It says "you gave two arguments to procedure NOT, one being the
procedure PAIR? and the other being the symbol H"

I believe that what this user now needs help regarding the (human)
interpretation of error messages of his implementation.
On the other hand (and in other situations) I think it's important to
mention that noone would/should consider doing Scheme/Lisp without
paredit or anything similar. The fact that it isn't common sense
explains why "the others" still think that writing lisp code is a pain
because "one has to check every parens one per one."

I would actually even like a paredit-like mode to be by default in the
readers of REPLs, when run interactively, so that people who just give
a try at a lisp think "Hey, I didn't know it was so cool!"

Cheers.

P!

-- 
Français, English, 日本語, 한국어



More information about the Gambit-list mailing list