Deutsch   English   Français   Italiano  
<vg2oho$33mjv$2@dont-email.me>

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

Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ruvim <ruvim.pinka@gmail.com>
Newsgroups: comp.lang.forth
Subject: Re: Toad using many vocabularies
Date: Fri, 1 Nov 2024 18:28:08 +0400
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <vg2oho$33mjv$2@dont-email.me>
References: <vg06r0$2o75r$1@dont-email.me>
 <a5fde3a7ae2cc7eaef371eebfdb814f6@www.novabbs.com>
 <vg2g8q$380c9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 01 Nov 2024 15:28:09 +0100 (CET)
Injection-Info: dont-email.me; posting-host="ccad98937f2c7e2e7d9efbf07e4d468c";
	logging-data="3267199"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19Hx5KLPDiK/4WufVp+sic3"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:t8VhycQ/x3QfS9gRubQPAn0Hams=
Content-Language: en-US
In-Reply-To: <vg2g8q$380c9$1@dont-email.me>
Bytes: 2439

On 2024-11-01 16:06, Stephen Pelc wrote:
> On 31 Oct 2024 at 17:30:45 CET, "mhx" <mhx> wrote:
>> It is also messy to write a definition that needs
>> words from different vocabularies.
>> ( Like a book with footnotes that span multiple pages,
>> or where a chapter can not be read on its own. )
>>
>> How did you solve that complexity?
> 
> Gerald Wodni implemented the VOC-DOT notation for VFX as a
> recogniser. To reference a word in another vocabulary, just use
>    <voc>.<word>
> This notation has proven to be very useful, especially when dealing
> with a range of byte-oriented serial devices, e.g:
>    i2c.emit
>    spi.emit
> 
> The notation also reads well. I have no idea who invented it originally
> and where the original source code is.


Such a syntax is used in SP-Forth/4 since 2001, in the form 
<voc>::<word> or <voc1>::<voc2>::<word>

Where <voc> is a word that returns wid, or a word that is created with 
`vocabulary`.

This syntax in SP-Forth probably came after C++ "::" operator, 
introduced in 1998.  The same operator was in C# from its initial 
release in 2000.

The dot "." operator for accessing nested packages in Java was 
introduced in 1995.

In Forth, a dot is often used as part of plain names, so it was less 
suitable as a namespace separator.


--
Ruvim