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



Tony Kimball wrote:
>
> :     add 2 3
> :     2 add 3
> :     3 add 2
> :     2 3 add
> :
> : are all sensibly parsable constructs as a human being.
>
> In English imperative sentences, the verb comes first.

Just to clarify my comment, which was:

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

The parenthesized statement really was intended as a joke.  One of the
things I found off-putting about Smalltalk's syntax was the colons after
message names (that take parameters).  Here's an example I just cut off the
web:

	'Got Milk?' replaceFrom: 5 to: 8 with: 'I am lost'

You mentioned English sentences.  It's for those kinds of reasons that the
colons get in my way when reading - I have an ingrained response to a colon,
especially when there's a space after it: it's a pause.  Translating the
above into "telegram form" (tm) might give you an idea of how I read the
above:

	'Got Milk?' replaceFrom PAUSE 5 to PAUSE 8 with PAUSE 'I am lost'

However, I do realize, as I said, that these are very subjective issues.
Hence the smiley I included - I wasn't seriously claiming that "2 add: 3" is
intrinsically less parsable, although it has proved to be for me.

Anton