From: Panu on
Stefan Schmiedl wrote:
>
> And "readable" is what you have learned to read.

True. But most people on this list learned to
read natural language first. Most of them probably
learned to read from left to right. Therefore,
Smalltalk is more readable for most people.

So this "everything is relative" argument has a
misleading flaw. Of course 'easy' means different
things to different people. What really matters
is what is easy for most people.

Now, if you invest your time in learning to read
Lisp (which I've done), the question still remains,
does it make Lisp more readable to you, than Smalltalk,
after a similar investment in time to learn it.


-Panu Viljamaa

From: Stefan Schmiedl on
On Fri, 21 Dec 2007 23:47:42 -0500
Panu <panu(a)nospam.com> wrote:

> Stefan Schmiedl wrote:
> >
> > And "readable" is what you have learned to read.
>
> True. But most people on this list learned to
> read natural language first. Most of them probably
> learned to read from left to right. Therefore,
> Smalltalk is more readable for most people.

True. Probably ;>

> So this "everything is relative" argument has a
> misleading flaw. Of course 'easy' means different
> things to different people. What really matters
> is what is easy for most people.

Really? IMO, what matters is how well the language
maps to the solution you come up for your problems.
If you're having a nice object based representation
of a given task, a language without objects won't
cut it. If you're dealing with a well-defined mathematical
problem, you'll probably not mind being able to define
functions with a fixed number of arguments only.

Parsing input with regular expressions is in many cases
easier to implement than using a "real" parser. And you
won't find things much more unreadable than regexps :-)

> Now, if you invest your time in learning to read
> Lisp (which I've done), the question still remains,
> does it make Lisp more readable to you, than Smalltalk,
> after a similar investment in time to learn it.

Both have simple syntax, for me there's no difference.
What I'm (sometimes) missing in Smalltalk is multiple inheritance,
but I have yet to look at the what and how of Traits.
What I'm missing in Lisp is a little bit of cleaning up
of the historically grown special cases (eg. different
accessor function names vs. different implementations
of the same message).

Dylan was, again IMHO, a step in the right direction, *before*
they decided to drop the Lisp based syntax. It looked and felt
like lisp, only lean and clean.

Merry Christmas,
s.
>
>
> -Panu Viljamaa
>

From: Cesar Rabak on
Panu escreveu:
[snipped]

>
> The interesting question to me is, is it better to require
> a fixed order of keyword arguments or not? I'm inclined
> to think the former, but I'm open to all arguments in favor
> of the latter.

I think that the ultimate 'fixed order argument' will bring back the non
nominated arguments having they meaning totally given by their position
in the method (function, predicate, etc.) call as it happens in C and
Lisp, C++ and Java and even Prolog.

But then the argument of reading like English disappears...
From: S Perryman on
Panu wrote:

> S Perryman wrote:

>> My point still remains.
>> There are better prog langs than Smalltalk to base keyword parameter
>> syntax/semantics on.

> I think it is misguided to phrase the issue in terms of
> which programming language "is better". Rather it should
> be about the benefits of particular syntactic conventions
> chosen. In the end perhaps this discussion will enhance
> the next version of each language involved.

> My original post was inspired by my perception that many
> main-stream languages seem to adapt features from Smalltalk
> at a slow pace, yet always going in its direction. To start
> with, C++ made C more like Smalltalk by adopting 'methods'.

<quote>

A History of C++: 1979−1991

C++ was designed to provide Simula's facilities for program organization
together with C's efficiency and flexibility for systems programming. It
was intended to deliver that to real projects within half a year of the
idea. It succeeded.

</quote>

Simula is the first OO prog lang is it not. The prog lang from which
Smalltalk took concepts and syntax (inheritance) ...


> I grant that the beauty here may be in the eye of the beholder.
> Since Lisp inspired many features of Smalltalk, you can argue
> that the trend is towards Lisp-like features as well.

> I'm curious: did the keyword arguments appear first in
> Lisp, or in Smalltalk?

> The interesting question to me is, is it better to require
> a fixed order of keyword arguments or not? I'm inclined
> to think the former, but I'm open to all arguments in favor
> of the latter.

1. In a few moments I will have completed this posting.
2. I will have completed this posting in a few moments.

Which of 1/2 above :

- conveys meaning (semantics) most succinctly
- uses words (syntax) most succinctly

Answer these and you have IMHO answered your own question ...


Regards,
Steven Perryman
From: Steven Kelly on
"Panu" <panu(a)nospam.com> wrote in message
news:476C96EE.6030907(a)nospam.com...
> Stefan Schmiedl wrote:
>>
>> And "readable" is what you have learned to read.
>
> True. But most people on this list learned to
> read natural language first. Most of them probably
> learned to read from left to right. Therefore,
> Smalltalk is more readable for most people.

Let's imagine a method "FileManager>>delete":

delete
self delete: selectedFile

If you were to use Smalltalk in a right-to-left locale, the method
"Filename>>makeWritable" should look something like this:

eteled
eliFdetceles :eteled lfes

You would however read it in the same order "self delete:
selectedFile". In other words, it's not the fact that we read
left-to-right that is familiar in Smalltalk; rather, it's the
Subject-Verb-Object word order. "self" is the Subject, which is doing
something, the verb "delete:", to the object of the verb,
"selectedFile". Since English uses the same SVO word order as
Smalltalk, it's "readable". SVO is the most common word order in
natural languages, followed by SOV: e.g. French "je t'adore",
literally "I you love", but meaning "I love you". Much less common is
VSO: "delete(self, selectedFile)" - the format used in the Actor
language, essentially a Smalltalk dialect. C may look like VSO, but I
think it's better analysed as SVO with an implied subject: the command
would be "delete(selectedFile)", with "self" being the whole
application; in other words the same as the English imperative "delete
selectedFile!"

Interestingly, Smalltalkers virtually never write messages like the
fictional FileManager>>delete:. If we want to perform an action
affecting another object, we don't make that object the argument of a
message to self -- "self delete: selectedFile" -- but instead send a
message to that object: "self selectedFile delete". In this case the
word order is SVV: "selectedFile" is no longer an object in an
instance variable, but a method in this class. In that way it's more
like a possessive than a verb: "delete your selectedFile".
Possessives, like Smalltalk, allow nice long chains: "self parent
browser selectedFile delete" = "delete your parent's browser's
selectedFile". Demeter's Law notwithstanding, perhaps Smalltalk should
have adopted something like Actor's syntax but used "your" instead of
"self": "delete(your parent browser selectedFile)" :-)

Steve