Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: Which scripting for embedded automation? Date: Mon, 27 Jul 2015 19:31:24 -0400 Organization: Aioe.org NNTP Server Lines: 46 Message-ID: References: <0e930740-22d8-4e2b-833f-bb5843437d0d@googlegroups.com> <87y4i6rvyc.fsf@jester.gateway.sonic.net> <87lhe5sciz.fsf@jester.gateway.sonic.net> <8f8f8dd6-efca-4f3e-ac18-ed28bce7524c@googlegroups.com> <36adnY7PUqw6dCjInZ2dnUU7-KednZ2d@supernews.com> NNTP-Posting-Host: n4wpt9zq8xR26Ttf9mo2BA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:40856 On Mon, 27 Jul 2015 04:19:50 -0400, Elizabeth D. Rather wrote: > On 7/26/15 7:30 PM, Rod Pemberton wrote: >> On Sun, 26 Jul 2015 22:49:50 -0400, Elizabeth D. Rather >> wrote: >>> The longer the phrase, the fewer instances it takes to justify >>> being factored. This particular phrase is very short, >> >> Yes. It's very short just like @ and ! are very short. >> They were factored. Are you saying they shouldn't have been? > > Yes. The difference is that @ and ! are ubiquitous, whereas this > particular, very specific indexing sequence would normally be > incorporated in the DOES> portion of a defining word, and never used > independently. So, it would never be used with PAD or to display a BIOS string which has no defining word for it's address? ... The user can enter an address directly on the stack, then use [] to index whatever is there. The big problem with Forth is there is no ability to know the size of the data the pointer points to. I.e., you'd need [] for cell size data and c[] for character sized data. >>> quite unlikely to be repeated beyond the use here, >> >> It can be used from the interpreted state with any address. >> I.e., it's a generic addressing operation like @ ! +! TOGGLE >> etc. So, why exactly would it be unlikely to be used? ... > > It wouldn't be used independent of the array defining word because > there is no need for it except in that context. It has little value > as an independent facility. C is a pointer based language where every object in C maps onto an array. It uses this functionality all the time for everything. The ANS Forth standard requires the same inherent layout. And, Forth deals with raw addresses too. I.e., I think you're strongly down-playing the usefulness here. Rod Pemberton -- Scientists now say we'll experience a mini-ice in 2030. So, I guess we need more global warming today ...