Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #42437

Re: Array Style ( was Re: Could Forth be getting a bit of traction? )

From rickman <gnuarm@gmail.com>
Newsgroups comp.lang.forth
Subject Re: Array Style ( was Re: Could Forth be getting a bit of traction? )
Date 2015-10-07 17:39 -0400
Organization A noiseless patient Spider
Message-ID <mv439t$3f2$1@dont-email.me> (permalink)
References <muv78t$8l8$1@dont-email.me> <fec19870-4152-484e-bceb-3e34ecb209c9@googlegroups.com> <56150c74.172170253@news.eternal-september.org> <mv3g7k$851$1@dont-email.me> <6c345d07-61a0-4301-952e-0ff35c14bc70@googlegroups.com>

Show all headers | View raw


On 10/7/2015 4:36 PM, Howerd wrote:
> On Wednesday, October 7, 2015 at 5:13:38 PM UTC+1, rickman wrote:
>> On 10/7/2015 8:19 AM, Stephen Pelc wrote:
>>> On Tue, 6 Oct 2015 14:06:15 -0700 (PDT), Howerd <howe...@yahoo.co.uk>
>>> wrote:
>>>
>>>> Jason, Anton, Bernd, Marcel, Stephen et al : is it possible to use local va=
>>>> riables in a child definition? Does this depend on the implementation, and =
>>>> is it defined/allowed by ANS?
>>>
>>> There are no current mechanisms for Forth locals to be referenced in
>>> words other than the one in which they are defined.
>>>
>>> Some systems, e.g. VFX, do permit you to obtain an address of a local
>>> variable. That address can then be passed into another word. This
>>> feature is useful when interfacing to operating systems but is
>>> non-standard. Other systems, e.g. iForth, use the limitations to
>>> enhance the performance of locals.
>>
>> I believe there was a rather lengthy thread on this not too long ago.
>> People proposed a number of mechanisms to limit the use of the locals so
>> it would not cause problems when referencing them in other definitions
>> than the one they were defined in.
>>
>> --
>>
>> Rick
>
> Hi Rick,
>
> All of this is not convincing me that locals are a good thing.
> They are way to complicated for a simpleton like me ;-)
> Even though it is easy enough to take some syntactic sugar "{" and "}" and make it point to an allocated area on the return stack, there is an increase in complexity if you try to support them fully.
>
> It reminds me of why Forth uses RPN : you could easily add a few "BL WORD"s so that you define :
> : add ( n -- )   BL word count number + ;   \ BL is $20
> then you can type :
> 1 + 1 . 2
> But if you do this you block the simple use of  add  , and have to start processing strings. Maybe you have re-invented Lisp?

I'm not sure what you are saying.  I don't have a horse in this race.  I 
was merely pointing out that others are interested in the sharing of 
locals and others have discussed this before.

I don't currently use locals but am open to learning about this if I 
find the stack to be a problem at some point.  I have written code that 
seemed to have trouble with the stack because of a large number of 
parameters which needed to be passed to a word.  But I eventually worked 
that out with different factoring.  So for now, I'm good.

-- 

Rick

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Could Forth be getting a bit of traction? "WJ" <w_a_x_man@yahoo.com> - 2015-10-06 01:14 +0000
  Re: Could Forth be getting a bit of traction? Jason Damisch <jasondamisch@yahoo.com> - 2015-10-06 10:47 -0700
    Re: Could Forth be getting a bit of traction? Chris Curl <ccurl609@gmail.com> - 2015-10-06 11:01 -0700
      Re: Could Forth be getting a bit of traction? Jason Damisch <jasondamisch@yahoo.com> - 2015-10-06 11:27 -0700
      Re: Could Forth be getting a bit of traction? lehs <skydda.barnen@gmail.com> - 2015-10-06 12:08 -0700
  Re: Could Forth be getting a bit of traction? Howerd <howerdo@yahoo.co.uk> - 2015-10-06 14:06 -0700
    Re: Could Forth be getting a bit of traction? Jason Damisch <jasondamisch@yahoo.com> - 2015-10-06 16:15 -0700
      Re: Could Forth be getting a bit of traction? Chris Curl <ccurl609@gmail.com> - 2015-10-06 21:48 -0700
    Re: Could Forth be getting a bit of traction? stephen@mpeforth.com (Stephen Pelc) - 2015-10-07 12:19 +0000
      Re: Could Forth be getting a bit of traction? Mark Wills <markwills1970@gmail.com> - 2015-10-07 07:40 -0700
        Re: Could Forth be getting a bit of traction? Michael Barry <barrym95838@yahoo.com> - 2015-10-07 08:27 -0700
          Re: Could Forth be getting a bit of traction? Coos Haak <chforth@hccnet.nl> - 2015-10-07 17:40 +0200
            Re: Could Forth be getting a bit of traction? franck.bensusan@gmail.com - 2015-10-07 10:50 -0700
              Re: Could Forth be getting a bit of traction? Coos Haak <chforth@hccnet.nl> - 2015-10-07 22:37 +0200
                Re: Could Forth be getting a bit of traction? franck.bensusan@gmail.com - 2015-10-07 23:22 -0700
          Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-10-07 09:14 -1000
          Array Style (was Re: Could Forth be getting a bit of traction?) Howerd <howerdo@yahoo.co.uk> - 2015-10-07 13:23 -0700
        Re: Could Forth be getting a bit of traction? Howerd <howerdo@yahoo.co.uk> - 2015-10-07 13:20 -0700
      Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-10-07 12:13 -0400
        Array Style ( was Re: Could Forth be getting a bit of traction? ) Howerd <howerdo@yahoo.co.uk> - 2015-10-07 13:36 -0700
          Re: Array Style ( was Re: Could Forth be getting a bit of traction? ) rickman <gnuarm@gmail.com> - 2015-10-07 17:39 -0400
      Array Style ( was Re: Could Forth be getting a bit of traction? ) Howerd <howerdo@yahoo.co.uk> - 2015-10-07 13:16 -0700
    Re: Could Forth be getting a bit of traction? mhx@iae.nl - 2015-10-07 10:46 -0700
      Array Style ( was Re: Could Forth be getting a bit of traction? ) Howerd <howerdo@yahoo.co.uk> - 2015-10-07 13:39 -0700
        Re: Array Style ( was Re: Could Forth be getting a bit of traction? ) mhx@iae.nl - 2015-10-07 15:01 -0700
          Re: Array Style ( was Re: Could Forth be getting a bit of traction? ) Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2015-10-09 22:05 +0200
    Re: Could Forth be getting a bit of traction? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-08 07:29 +0000

csiph-web