[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: Carsten Strotmann
Subject: Re: [gforth] Inclusion of minimal-forth code in gforth
Date: Fri, 27 Apr 2018 23:44:26 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.0

Hello Josh,

On 27.04.18 20:55, Josh Grams wrote:
> 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?

I'm happy either way. If someone wants to write better code with the
same or better result, that would be great. If not, the current code is
good already, it does not need to be perfect for the intended use-case.

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

I'm not proposing making the minimal forth a default, it is just an option.

Every user is free to choose to use the full gforth system, the minimal
learning subset, or something different.

Providing the option of a minimal learning system in the gforth
distribution will make gforth (and therefor Forth in general) more



Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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