[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Functional Paradigm popularity and Maths (Was: XML as a transition to s-expr)



David Simmons wrote:
> I entirely agree with you. In my opinion, Smalltalk has largely suffered
> from the fact that it is "different" syntactically from the mainstream.
...
> It is one of the reasons why I extended and evolved Smalltalk from the
> outset of my work on the first commercial implementation version of QKS
> Smalltalk in 1991.
>
> It has been a driving force in the design and implementation of
> SmallScript as new language based on a superset of classic Smalltalk.

Glad to know it wasn't just me. :)  And I promise to check out SmallScript.
I have Squeak installed on my system, despite my syntactical aversion.

> > The parentheses are a short step from there.
>
> Sure. But why do I need them?

That's been covered here already - because it provides some useful
capabilities which might come in handy later - macros, code-as-data.  Both
of these probably have more to do with limitations in existing languages,
that don't typically make it easy to read their own code, or redefine syntax
in a hygienic way.  So perhaps in future, the benefits currently provided by
parenthesized syntax will be eroded, but there don't seem to be many good
alternatives at present.

If you then ask "why does a newbie need parentheses", I would say that
perhaps they don't, but it depends on what you want to teach them.  I agree
with Shriram: pure Scheme is the machine embodiment of an elegant
mathematical formalism, that can be viewed as underlying all known computing
operations.  Niggles about parentheses pale in comparison to the sheer,
mindblowing importance of this fact.  :O))

Because of this, if you want to teach computer science, as opposed to simply
programming, Scheme is an excellent tool to do it with, even at an
elementary level, as the PLT group seems to be demonstrating.  In that
context, large codebases are not typical, good form is being taught, and a
helpful editor is being used, so I really can't see the parens as an
enormous impediment.

If the question is whether a more natural language is possible for humans,
sure.  No-one seems to agree on what that should look like, though, so in
the meantime, we're in the thousand-flowers-blooming stage, and probably
will be for a long time to come.  After all, we don't all speak a single
natural language yet, and we've had millenia to get our act together in that
respect.

I can't speak for Common Lisp, but I'll readily agree that *standard* Scheme
won't compete well with some scripting languages when it comes to brevity
and naturalness of expression.  "SchemeScript", anyone??  But with macros
and a suitable object system, you could probably implement something like
your:

>	filestream append('Hello'); flush; close.

as:

	(send-multi filestream (append "Hello") flush close)

Part of the fun of Scheme, if you're into language design, is being able to
customize and develop your own little languages in it with very little
effort.  That's also a big reason why no two Schemes are alike...

Anton