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)




On Wed, 11 Nov 1998, Clayton Weaver wrote:

> And why did the language designers leave out the "else" in "if condition
> do () else do ()"? This is at least as perverse from a programming
> language student's viewpoint as implicit binding of free variables. 

No sugar, please.  I /like/ the fact that guile does without the syntactic
sugar.  I don't like having to type out "foo extends bar" in java, when
there is already construct for showing that relationship that avoids the
extra word.

Start adding extra kruft and you break the spirit of the language.  I most
certainly wouldn't want to use 

(if (test) then do (something) else (something else))

"then" or "do" is redundant after the if, else isn't necessary either.
likewise, "begin" and "end" are far more than necessary in Pascal ({}
works just fine, thanks.) 

(if (test) (something) (something else)) is very clean and I don't have to
worry about redundant words to mispell.


> What I would do is redesign the syntax with the moral equivalent of
> street signs that clearly show in the code the scope of variable
> bindings. 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.

Street signs are nice.  I look at them the first time or two I go
somewhere.  After that they just get in the way.

Clear examples are nice too.  Much better than street signs.  I found them
in the guile tutorial, several web pages, and a couple nice .ps files with
general scheme tutorials.  I'd like to thank whoever put together the
current guile reference, because it made setting up my current project go
much faster than figuring out someone else's code would have.


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

I haven't seen ANYTHING where scope of variable binding is more clear than
a let statement, unless it's the old style perl "everything's global"
attitude.

Guile isn't descended from "C" or anything like it.  Perl is.  Java is.
C++ is.  If you know C, learning perl is changing how you spell function
names, forgetting to use parens a lot of the time,  and not worrying
about what type your variables are.  

I like the mode of thinking that scheme encourages me to use. I hope that
I can eventually become comfortable enough with it to be as productive
with guile as I am in C.  I certainly wouldn't want to turn it into C, though.


Erik
erik@msc.tamu.edu