[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gforth] Inclusion of minimal-forth code in gforth

From: Josh Grams
Subject: Re: [gforth] Inclusion of minimal-forth code in gforth
Date: Fri, 27 Apr 2018 14:55:18 -0400

On 2018-04-27 09:04PM, Carsten Strotmann wrote:
>The idea is to have this code that creates a minimal forth wordlist
>inside gforth shipped with the gforth code, so that it is immediately
>usable for Forth beginners.

Ulli Hoffman's code goes out of its way to try and work on any ANS-94
system.  I'd think it would be better to do it in gforth-specific code:
it could be shorter and cleaner.

Also it seems to pretend that it's bootstrapping a new system from
scratch instead of just isolating words from an existing system.  And
frankly I think that's stupid.  If you're doing it for educational
purposes, there's no reason that I can see to define things like:

: + 0 swap - - ;

Why not just alias it to the existing addition word?

>gforth is powerful. having the minimal forth wordlist code shipped with
>gforth would make it easier for beginners to start learning forth with
>gforth and staying with gforth while they become masters in forth.

I don't see that it makes much difference.  If you don't tell beginners
about WORDS then they'll never even know.  And I don't recall using
WORDS when I was learning Forth, either in minimal systems or in big
ones like gforth, except as a "wow, look at all the stuff that's here"
sort of thing.

Nor do I ever remember making errors where I typed a more advanced Forth
word instead of one frorm the minimal word set by accident.

Racket (a Scheme-like language) does do this sort of limited languages
for teaching purposes, but it has dynamic type checking, and they're
using the limited language to provide better error messages for common
use cases which are valid Racket code but are almost certainly an error
when a beginner writes them.  I don't *think* that's the case here.  Do
you have examples of common beginner errors which would be better served
by a minimal word set?

Even with Racket, their Beginning Student Language leaves out some
extremely common conveniences and quickly becomes clunky and irritating.
The couple of times that I've tried teaching Racket to beginners they've
gotten frustrated and we've moved right on to the full language.

I'd say introducing words a few at a time is a job for textbooks and
documentation, for instance the gforth tutorial

(not that I have anything to do with gforth, but that's my two cents)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]