| Deutsch English Français Italiano |
|
<cf9dc70297223ad4a39ba1a4ba2c072c8737e306@i2pn2.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.misty.com!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: dxf <dxforth@gmail.com> Newsgroups: comp.lang.forth Subject: Re: "The Best Programming Language for the End of the World" Date: Sat, 5 Apr 2025 14:48:10 +1100 Organization: i2pn2 (i2pn.org) Message-ID: <cf9dc70297223ad4a39ba1a4ba2c072c8737e306@i2pn2.org> References: <87bjtn2hct.fsf@gmail.com> <nnd$4e8dcfed$6eb3f489@d30798298ac0a139> <nnd$654242bd$3596f9c9@84688dbe60c4ab0e> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Date: Sat, 5 Apr 2025 03:48:09 -0000 (UTC) Injection-Info: i2pn2.org; logging-data="3180643"; mail-complaints-to="usenet@i2pn2.org"; posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc"; User-Agent: Mozilla Thunderbird In-Reply-To: <nnd$654242bd$3596f9c9@84688dbe60c4ab0e> X-Spam-Checker-Version: SpamAssassin 4.0.0 Content-Language: en-GB Bytes: 2469 Lines: 32 On 4/04/2025 10:36 pm, albert@spenarnc.xs4all.nl wrote: > In article <nnd$4e8dcfed$6eb3f489@d30798298ac0a139>, > Hans Bezemer <the.beez.speaks@gmail.com> wrote: >> On 27-03-2025 06:05, Alexis wrote: > ... >> "I've looked at a lot of Forth code, and it's almost uniformly >> doc-free." That's an attitude problem - not a language problem. > I agree. Most programmers agree that ( -- ) is sufficient documentation. > My advice is : precede each word with a specification that allows > the use of this word. The ideal is that the definition itself is > in fact the documentation of the definition. This is Chuck Moore's > pipe dream. I'm not so sure. 10 definitions and 2 comments. Does it need more? \ Encountered file error, display msg, filename then quit : FERR ( ? ior a u -- ? ) rot 0= if 2drop end cr ." File error: " type ." - " @fname type abort ; : FOPEN ( a n fam -- ) open-file s" open" ferr cf ! ; : FCREAT ( a n fam -- ) create-file s" create" ferr cf ! ; : FREAD ( a n -- n' ) cf @ read-file s" read" ferr ; : FWRITE ( a n -- ) cf @ write-file s" write" ferr ; : FSEEK ( ud -- ) cf @ reposition-file s" position" ferr ; : FCLOSE ( -- ) cf @ close-file s" close" ferr ; \ Install terminal data at offs to target at adr : SET.S ( a ofs -- ) dbuf + count rot >target place ; : SET.W ( a ofs -- ) dbuf + @ swap >target ! ; : SET.B ( a ofs -- ) dbuf + c@ swap >target c! ;