Deutsch   English   Français   Italiano  
<b181be5d4e6c9abd8ed22606ab2dfb91@www.novabbs.com>

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

Path: ...!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: Operator =?UTF-8?B?b3ZlcmxvYWRpbmc/?=
Date: Tue, 30 Jul 2024 18:55:55 +0000
Organization: novaBBS
Message-ID: <b181be5d4e6c9abd8ed22606ab2dfb91@www.novabbs.com>
References: <a1aab44ee3b1b56c2f54f2606e98d040@www.novabbs.com> <v8b04c$137lg$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
	logging-data="905058"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="0+ejqm+s29REto3A2x2P4fP+XaUXf51pZgtYBR0nEqI";
User-Agent: Rocksolid Light
X-Rslight-Posting-User: d2a19558f194e2f1f8393b8d9be9ef51734a4da3
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Site: $2y$10$HyVIWzKhjqxO92se0cbCf./T2M4p7DAljqe1kJYLcB.qt8ghtLETC
Bytes: 2043
Lines: 26

On Tue, 30 Jul 2024 15:16:28 +0000, Stephen Pelc wrote:
> The standard suggests/specifies that operators such as TO behave as if
> they parse. Ignore that for the moment and define
>
> variable operator
>
> : to  1 operator !  ;  immediate
>
> A child of VALUE is probably an immediate word that inspects OPERATOR
> and compiles the fetch action if 0 or the store action if 1. This scheme
> can
> be extended to support a wide range of operators, such as +TO INCR DECR
> and so on. MPE has used this scheme for several decades with no tech
> support issues. If you really want to to be fussy and avoid the use of
> the
> "as if" rule for parsing, you can do something like (untested) the below
> for TO. But why bother?
>
> : to
>   1 operator !  ' execute
> ;  immediate

Thank you. So instead of wasting time on parsing during compilation- or
interpretation time, the runtime action of an xVALUE (even when
compiled)
involves to walk a type-specific operator chain (a large CASE construct
in VFX). This makes them slower when compiled, but why not.