[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:
> Where the process of mentally parsing them (when nested) is easier with
> additional degrees of experience in abstract thinking of this very form.
> I.e., read some lisp/scheme, it gets easier. Read it all the time, it
> "seems" really easy and natural (especially with a good pretty printer).

I have to point out that a very similar thing applies to Smalltalk - I say
that from personal experience.  For Smalltalk, your statement might need to
be rephrased along the lines of "the process of mentally parsing messages
(when chained)..."

Despite being a big fan of Smalltalk's semantic model - I implemented a
language extension product in '91 which had a metaclass model based on
Smalltalk's - I never felt comfortable with Smalltalk's syntax.  I've
programmed in or played with dozens of other languages, and very few have
put me off in the same way (APL and OCaml come to mind).  I'm sure, had I
forced myself to use Smalltalk, that I could have gotten used to it.  But
these mental blocks can take real effort to overcome, and as proof of that,
I offer your resistance to parentheses... ;)

The real point, I think, and this is aimed in general at some of the broader
discussion taking place here, is that most if not all of these preferences
are just that: preferences, subjective and personal.  The issue with Lisp is
that the prefix/parenthesis model is unfamiliar to most people.  They're
taught other things in math at school, and by their calculators, even before
they get to programming languages.  That doesn't mean those things are the
most natural - I'm sure the Romans were convinced that numbers like MCMLXXV
were perfectly natural.  (The newsgroup flames when the switch to decimal
notation occurred would have been something to see!)

It's easy to imagine teaching prefix notation to a young child, though: "if
you want to add 2 and 3, what do you write?":

	add 2 3

The parentheses are a short step from there.  (But switch that around to "2
add: 3", and the result is clearly incomprehensible ;)

> Where, in Smalltalk, the concept of ubiquitous and consistent
> "thing/object" semantics are directly exposed as the language.

I think this is valid, and it's a big reason why many functional languages
support an object capability.  I'm of the opinion that languages will evolve
to have increasingly functional cores, largely because of the leverage that
provides to language developers, but that languages aimed at
non-mathematical everyday programmers will have front ends that exhibit all
the usual geegaws and warts that help make people comfortable and
productive.  This might place some limits on, for example, how strictly
typed the cores can be, but that may just be part of the cost of ergonomics
in languages - like a Cadillac having a greater drag factor than a Formula I
car.

Anton