This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Implicit binding and ergonomics (was Re: ... too complicated)


Clayton Weaver <cgweav@eskimo.com> writes:

> It's not functional semantics that is at issue, it is not data
> structure complexity, it is "how long will it take before this
> language is useful to me in the tasks that I have to accomplish".

You're right that learning scheme does not leverage a lot of people's
existing C/Perl assumptions about how programming languages work, and
that this means that there will be a price to pay the first time
someone tries to write a program in scheme.

> Implicit binding generates higher training costs over the industry
> as a whole.

I'm not sure what you mean by 'implicit binding'.  I think I
understand your question about 'if', and I'll try to address that.

You only need to remember _very_ few special or binding forms to
program in scheme.  lambda, if, cond, do, case, set!, let, let*,
letrec, define.  There, that just about covers it.  Many of these
forms are alien to C programmers, it's true, but at least there are
very few of them.

Getting back to the implicit binding question, how about this example:

   C:                             scheme
  -----------------------------  ------------------------
  a = a == NULL ? original_a;    (let ((a (or a original-a)))
  code_using_a;                     code-using-a)

What makes the scheme bindings 'implicit', especially in comparison
with the C example?  As others have already mentioned, a good editor
will automatically indent the let form so you can tell the extent of
'a's binding.

> Assuming that isn't really an option given the goal of easy
> importing of existing scheme code, the only alternative is really
> good examples that don't leave out any details, as if you were
> explaining the very idea of a variable to someone who had never
> written a single line of code before.

Yes, I whole heartedly agree that guile needs to provide a series of
examples for those new to scheme, that has lots of nice examples.

> Without that, people will still use guile (it does have a complete
> programming language's capabilities and the semantic elegance of
> lisp), but you won't make a dent in the market for imperative
> scripting languages where scope of variable binding is obvious
> (imho).

Worse is better, remember that.

-russ

--
IDIOT, n - A member of a large and powerful tribe whose influence in
human affairs has always been dominant and controlling.
             -- Ambrose Bierce