Re: Inclusion of minimal-forth code in gforth
Carsten Strotmann <carsten-BEUwUN0/[email protected]>
| Newsgroups | gmane.comp.lang.forth.gforth |
|---|---|
| Message-ID | <[email protected]> |
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 > (http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Tutorial.html). > > (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 accessible. Greetings Carsten
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEhUZjXZ9rvJXjcufGTH6A3k9sL0IFAlrjmboACgkQTH6A3k9s L0KwtxAAjV+YEuFLtVkCwyjjcJbbHIFTjD43i3MXUCRSjtGfxBmwL/JWpMQU8K0O HEKaEhtVejrwcmLlY0dbaKD2lZrVEYMl2qJtEo+M6TWlcuT/OyQ3TOtc9f0o1CUh ep39tbAvQ7Cgc3WnyGUnxidzymuoD1278grtEEWTJOe61B0d7v2F50Wv3kBTt5hN 6OpcwVFmW54hfqvxk2FoHtzRCj8SOYvVSNWZZsNMjjzdBTmt0I+WD6la5BrFemUw 3nlBwq9120DuijcRowIdk/txDyHqvMKxEBP9coXnLHne5VW7sePI/MOF1AKmzrU6 AX2EMl8tYG9CZ5TMe32LeJZtwY/gFGyTlaQ/3InlYIdXAdvCAPSTcG+3tgGjbtIf ebW5Pc2tUjUqvcjIaFYvi3CzatwesKQ3RvJWWGR51MCheuhTRO6X8k5anI5s1qF4 JUJPn4PfIpzSMHBPh1CcKeprooA7VmtM5gsOC56frXF1gds4LzDqWwnW+afqE1/0 jtqv3GZae5qkWfJU9kvkqR2lbImIFx1E6omLAPUAG39pinPLAPmwxK0Fp+46KCcU UnB0VIOtdqh4j4krYinaL6fuyAuF8fJS3ud2WQPovlB5sPXZc3XvigfcDSZLgfr7 5o+my1LOxF5CiqlTEX3Mbt1yHTWETRLWp1fTqJliLvW9eeojJQM= =h7ee -----END PGP SIGNATURE-----