Deutsch   English   Français   Italiano  
<ea2ba1551b51fa08184eef0b52cf7be46b7589a9@i2pn2.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!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: Mon, 28 Apr 2025 19:22:40 +1000
Organization: i2pn2 (i2pn.org)
Message-ID: <ea2ba1551b51fa08184eef0b52cf7be46b7589a9@i2pn2.org>
References: <87bjtn2hct.fsf@gmail.com>
 <nnd$493b702f$2dffc858@72e43d108bb4bf63>
 <nnd$4593f776$3c4612bf@52cb6a9c017d68ee>
 <b73cd7a7ab393f51bfaa18a9171086732bcc0bdf@i2pn2.org>
 <nnd$647a0dc3$378a1aa0@d9dfcd8f972442e7>
 <ad74f0fa6db16d31e11c9c9901aad39ab3c15e67@i2pn2.org>
 <nnd$63e5382c$3fdcafbf@3f3b7214bd28514c>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 28 Apr 2025 09:22:42 -0000 (UTC)
Injection-Info: i2pn2.org;
	logging-data="2229308"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc";
User-Agent: Mozilla Thunderbird
X-Spam-Checker-Version: SpamAssassin 4.0.0
In-Reply-To: <nnd$63e5382c$3fdcafbf@3f3b7214bd28514c>
Content-Language: en-GB
Bytes: 1778
Lines: 10

On 27/04/2025 8:28 pm, Hans Bezemer wrote:
> ... 
> Just a shame the very basics are missing. The only thing holding Forth back is the refusal to abstract strings. Wanna make it a counted string with a cell count? Do it. Wanna keep on doing counted strings? Do it. Wanna do ASCIIZ strings? No problem.

But aren't string primitives a la ANS-Forth the key to flexibility?  I've used
the concatenation primitive  +STRING ( a u a2 u2 -- a2 u+u2 )  countless times.

: ZPLACE ( c-addr u c-addr2 -- )  zcount +string + 0 swap c! ;

: ZAPPEND ( c-addr u c-addr2 -- )  zcount + zplace ;