Deutsch   English   Français   Italiano  
<nnd$5c42a5a4$300a1fd4@3977542249399dd6>

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

Newsgroups: comp.lang.forth
References: <02c99c0785dce8043377d34b8ad339885e2d61d1@i2pn2.org> <100sirh$lm0v$2@dont-email.me>
From: albert@spenarnc.xs4all.nl
Subject: Re: Naming 'n' instances or repetitions
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$5c42a5a4$300a1fd4@3977542249399dd6>
Organization: KPN B.V.
Date: Sat, 24 May 2025 21:45:45 +0200
Path: ...!weretis.net!feeder9.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feed.abavia.com!abe006.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 72
Injection-Date: Sat, 24 May 2025 21:45:45 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
Bytes: 2831

In article <100sirh$lm0v$2@dont-email.me>,
Ruvim  <ruvim.pinka@gmail.com> wrote:
>On 2025-05-22 07:34, dxf wrote:
>> I've noticed two ways of naming things 'done n times'.
>>
>> In SwiftForth there is:
>>
>>    (.0) (H.0)
>>
>> which equate to executing '#' 'n' times.
>>
>> It's not clear to me why '0' was used though '0' appears in forth naming
>> conventions meaning 'initialization'.
>>
>> In VFX Forth (and perhaps others) there is:
>>
>>    NDROP
>>
>> where 'n' indicates number of executions.
>
>
>In the word names like `ndrop`, `n>r`, `nr>` I consider `n` as an
>indicator of the data type on which these words operate.
>
>Namely, it is an indicator of the data type ( +n.len*x +n.len ), that is
>a dependent pair type.


I agree with as n counts, # is better.

>
>
>Other examples.
>
>In the words like `2swap`, `2>r`, `2drop`, `2!`, etc, `2` is an
>indicator of the data type ( 2*x ), that is an unspecified pair ( x x ).

I don't like words that start with a digit. pswap p! p>r etc. is better.
>
>But in the word `2/` (and non-standard `2+`), `2` is not a data type
>indicator. Therefore, this name conflicts and is best avoided/eliminated.
 2/  is misleading because is is not the same as 2 / .
Because they are actually shift operators  >>A and <<A are better.
(Because actual normal shifts are << and >> ).

>
>
>In the words like `u/`, `umin`, `umax`, etc, `u` is an indicator of the
>data type ( u ), that is unsigned single-cell integer number.
>
>In the words like `d+`, `dnegate`, etc, `d` is an indicator of the data
>type ( d ), that is signed double-cell integer number.

Agreed.

>
>
>See more at  https://github.com/ForthHub/discussion/discussions/186

Now go design your own language. (I did).

<SNIP>

>--
>Ruvim
>
-- 
Temu exploits Christians: (Disclaimer, only 10 apostles)
Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
And Gifts For Friends Family And Colleagues.