Path: csiph.com!1.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!news.albasani.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: C to Forth (was Ting) Date: Tue, 24 May 2016 00:28:48 -0700 Organization: A noiseless patient Spider Lines: 35 Message-ID: <87mvnfhq33.fsf@jester.gateway.pace.com> References: <5736338d.13710740@news.eternal-september.org> <87wpmuonmz.fsf@jester.gateway.pace.com> <2016May16.153714@mips.complang.tuwien.ac.at> <9cee1949-05d9-4f78-82c5-b9d9f512f2fa@googlegroups.com> <30f7a26d-ee8a-4bb1-a9e6-2fb9c5deec03@googlegroups.com> <938662b0-97b1-42dd-951c-df1fdafab845@googlegroups.com> <4ccd7da9-ce35-434d-afd5-f16c1324ede9@googlegroups.com> <0c344658-0e5b-403c-85b3-28a4d40a58aa@googlegroups.com> <87shxdeoz7.fsf@jester.gateway.pace.com> <87bn40c7oo.fsf@jester.gateway.pace.com> <87zirhgxh6.fsf@jester.gateway.pace.com> <87r3csgr1v.fsf@jester.gateway.pace.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="c5ef8e90944559a2c1f3d45645d0f786"; logging-data="15401"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/vp2MenRa+V9G1HwcQbQFr" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:P7rP5zU+hCHdUe/G0iaSXe8Xg9M= sha1:B9H80mb6DM8AFIKyukObpZT1zxk= Xref: csiph.com comp.lang.forth:47465 "Elizabeth D. Rather" writes: >> There's also the whole need to juggle the target wordlist into the >> "current wordlist" position instead of having FIND and DEFINE simply >> take a wid argument. > The standardization effort has primarily focused on enabling portable > applications and portable programmers, rather than standardizing the > actual Forth compiler process. We have thought that the more freedom > given to implementors the better the implementations would be come. 1) it seems to me that a fair amount of the standard exists to make sure that a standard self-hosted interpreter is possible. Why else are there words like AHEAD? 2) there's certainly lots of ways to implement lookup tables keyed by strings. The more common ones used in compilers make it something of a pain to implement MARK or FORGET, so the standard already creates some constraints on implementation. But there is still a fair amount of freedom, and most ways I can think of make it easy to expose a function like what you mentioned Forth Inc. called WORD. So if that were standardized, I doubt it be much more of a constraint. 3) regarding "the better the implementations would become": there are many interesting challenges in implementing Forth, and the quality of an implementation rests on mostly how well the programmer meets those challenges. However, implementing word lists isn't really one of them. It's very basic, and it was done in unbelievably primitive ways in historical Forths (this is one of the aspects of Forth that makes it special, and I mean that in a good way). The question is what interface should the word list code present to the application programmer. It looks to me like ANS (maybe based on earlier practice) chose an interface that could have been a lot better. The gforth manual at http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Why-use-word-lists_003f.html describes some of the issues.