home .. forth .. colorforth mail list archive ..

[colorforth] Re: objects and forth


  Hello!

Don't top-post, please. It breaks the flow and is hard to clean up.

"John R. Strohm" <strohm@xxxxxxxxxxx> writes:

> From: "Aleksej Saushev" <asau@xxxxxxxx>
>> "John R. Strohm" <strohm@xxxxxxxxxxx> writes:
>>
>>> Learning C first will probably do some damage.
>>>
>>> Learning Smalltalk first will probably do some serious damage.
>>
>> Which way? I don't believe that.
>>
>> I'm more inclined to believe that learning Smalltalk first will cure you
>> from Forth DIY disease. At least with Smalltalk you get complete system,
>> usable "mind amplifier."
>>
>>> Learning LISP first, if you learn it RIGHT (i.e., from SICP),
>>> will probably help a lot more than it hurts.
>>>
>>> Recall that there are two categories of computer languages:
>>> LISP, and everything else.
>>
>> And how much does Smalltalk differ from Lisp in conceptual simplicity of
>> base language?
>>
>> I'm pretty sure, that if you learn Smalltalk right, it will help more
>> than learning Forth rigth. Just compare Squeak to equally licensed Forth,
>> pForth or FICL. Feel the difference. Compare it to Gforth and feel it again.
>
> The question was whether learning C, Smalltalk, or LISP before
> attempting to learn FORTH would help or hurt.

The question was not this, as you could easily see above, if you didn't top-post.
There were two more particular questions:
1. Which way does Smalltalk do serious damage?
2. Why Lisp is considered that different from Smalltalk?

> Smalltalk is, as near as I can tell without spending a LOT of
> time learning it in detail, inextricably tangled up in twisted
> weave of classes.  None of C, LISP, or FORTH have that
> particular feature.  All can be extended with classes. C has two
> main ways, Objective C and C++.  LISP does it with CLOS.  FORTH,
> you roll your own, but look at CREATE-DOES> for a starting
> point.

I can tell you for sure, that Forth is inextricable set of words
without any classification and even relations inside. All of
implementations known to me put almost everything into FORTH
wordlist. In Smalltalk you can learn relations between objects
and classes, in Forth you can't do it, all you can is to resort
to external tools, not written in Forth in most frequent case,
and external documentation, which may be outdated or otherwise
not reflect the reality.

> It is not clear to me that requiring the student to master many
> intricacies of object-oriented design and programming is all
> that likely to help him learn the mindset of a language that
> explicitly does not include object orientation.

There isn't much complexity in object-oriented design. Most problems
exist in your head only, because you have learnt another ways to
structure programs or haven't learnt it at all, or you have learnt too
many ways of being object-oriented (late vs. early binding, class vs.
prototype) and you simply can't focus on single one, because you can do
any of them in Forth. When teaching anyone, it is important to focus
attention on one single way of doing things, otherwise you don't reach
any useful effect.

> On The Gripping Hand, as Niven & Pournelle fans say, the RIGHT
> way to learn FORTH is to grab a copy of Leo Brodie's wonderful
> book "Starting FORTH", and work through it.  Follow that up with
> "Thinking FORTH", by the same author.

Like I pointed above: Smalltalk enables novice to write practically
useful programs right away, you can't tell that about Forth, Forth
isn't even near to the same level.


-- 
HE CE3OH...


---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com