Doug Hoffman <no.spam> wrote:
> Guy Macon wrote:
>
> -snip-
>
> > One example does not a general rule make. There are graphical
> > programming languages that are quite sucessful and liked by many,
> > one of which is older and more widely-used than Forth.
> >
> > Take LabView, for example:
>
> I won't deny that there can be a place for a graphical approach. I
> just don't want to program Forth that way.
>
> But if you and Jonah want to do it I wish you luck and will be
> interested to see how it turns out.
This is an old idea for me. I used to think of an editor that would
automatically display little lines on each side of each Forth word to
show something of their stack effects. It would be a programmer
convenience. I didn't have the skill to make an editor do that under
MS-DOS, and it looked like a big effort anyway for something that *I*
didn't need. I thought it would be useful for people who were first
learning Forth, and it would be useful for people who reject Forth as it
is because they don't want to hold so much in their heads. So I never
did it. By the time I could do that with reasonable effort I didn't need
to.
"The cobbler's children have no shoes."
If we're discussing ways to make Forth easier to learn or easier to use,
I think something like this would be useful. If you have a stack picture
in front of you all the time it doesn't look like postfix, it looks like
you're just operating on the data. When somebody is used to infix
notation then postfix looks weird and hard to deal with. See the data at
each step and it's easier to forego writing out the names every time.
I think Forth loses 90% of its potential userbase by being postfix. It
might lose some more by not being as fast as C or by allowing too much
flexibility or by not having a single default OO but postfix is the
first cut. And a lot of the rest of the arguments against might be by
people who really rejected it for postfix but who've heard the other
claims and think they sound better -- it doesn't sound suave or
sophisticated to say you let a little thing like postfix throw you, even
when it's true. Easier to say something that sounds like you're too
professional to use Forth than something that sounds like you're kind of
stupid. Even when in reality you *could* learn to use postfix but you
just don't see why it's worth the trouble.
If you want more people using Forth, make it easier for beginners to
use. An editor that shows you the stack after every word is a help for
that. An editor that shows you the stack while you look directly at the
code without having to look away to see a stack diagram is even better.
In addition, if you make short descriptive names for each created data
item when you create it, when it's the output of a Forth word, you could
click on a word and see a stack diagram showing those names for inputs
and outputs. I think having the stack effects showing right in the code
is more im****tant, but the other would help some.


|