Deutsch   English   Français   Italiano  
<v8cuur$1go8k$1@dont-email.me>

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

Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Gerry Jackson <do-not-use@swldwa.uk>
Newsgroups: comp.lang.forth
Subject: Re: Operator overloading?
Date: Wed, 31 Jul 2024 10:08:43 +0100
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <v8cuur$1go8k$1@dont-email.me>
References: <a1aab44ee3b1b56c2f54f2606e98d040@www.novabbs.com>
 <v8b04c$137lg$1@dont-email.me> <nnd$6e668a8e$712b1a09@1b1e479e823969fb>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 Jul 2024 11:08:44 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0d1f0f3d47a9af4cbbca5675631d0bc2";
	logging-data="1597716"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+5w86KR1e3cTosdyPptyY1J9NfwWp9vJQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:+se3KGD3EetEgvYIDDLZ+JcXyQQ=
Content-Language: en-GB
In-Reply-To: <nnd$6e668a8e$712b1a09@1b1e479e823969fb>
Bytes: 2887

On 31/07/2024 08:47, albert@spenarnc.xs4all.nl wrote:
> In article <v8b04c$137lg$1@dont-email.me>,
> Stephen Pelc  <stephen@vfxforth.com> wrote:
>> On 25 Jul 2024 at 08:30:58 BST, "minforth" <minforth> wrote:
>>
>>> Forth has a lot of ‘redundant’ operators for e.g. arithmetic or
>>> stack operations, depending on the data type.
>>>
>>> There was once an interesting approach for a type-bound layer
>>> on top of standard Forth:
>>>
>> https://comp.lang.forth.narkive.com/rexLEBd0/strongforth-implemented-in-ans-forth
>>>
>>> Unfortunately, the website for downloading strongforth.f
>>> is no longer available.
>>>
>>> Or has anyone found another way to bundle/overload Forth operators?
>>
>> The standard suggests/specifies that operators such as TO behave as if
>> they parse. Ignore that for the moment and define
> 
> There was a discussion about that before. The stipulaton is null and void.
> It was established that there was no way a compliant program could
> decide either way. It could be as well eliminated.
> 

Here's a program that demonstrates a non-parsing TO:

  VFX Forth 64 for Windows x64
   © MicroProcessor Engineering Ltd, 1998-2023

  Version: 5.43 [build 4238]
  Build date: 9 November 2023

  Free dictionary = 6731782 bytes [6574kb]

111 value x x . 111  ok
222 to cr .( Does TO parse? ) x x 222 = [if] .( No it doesn't!) [then]
Does TO parse? No it doesn't! ok

Using a flag means that x could be on another line or even in another file.

You could argue that it's not a standard program because it contains a 
deliberate ambiguous condition so a parsing TO would fail in some way 
but it does demonstrate non-compliant behaviour.

Whether it matters is another matter.

-- 
Gerry