Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!border2.nntp.ams2.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 08 Nov 2012 06:52:45 -0600 From: Chris Hinsley Newsgroups: comp.lang.forth Date: Thu, 8 Nov 2012 12:52:45 +0000 Message-ID: <201211081252454561-chrishinsley@gmailcom> References: <2012110713421835115-chrishinsley@gmailcom> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: Genral advise and comments on callback style words User-Agent: Unison/2.1.9 Lines: 37 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-PHDgoDdsYWtLis5CUfzGDjNqj+Drh1w+z8+nw2f/r3+5fOGdjF4+vAv/E8YWcZ0nBtFMKWDoUdXBlWr!PVjDfhtJHeyIVgzLTQ+t8QgVRRWRxQiMjJlx6pCQ90zc9tRGTqy828KgUU6s8gxSjkZGCg== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2745 Xref: csiph.com comp.lang.forth:17147 On 2012-11-07 16:07:35 +0000, Brad Eckert said: > Two comments: > > 1. You are using really long names for some words. Name collisions > aren't necessarily bad, so you don't have to go out of your way (like > using 26-character names) to avoid them. Sure, don't step on a system > word that you'll need later, but it's okay to have a HEAD that is only > needed in this scope. Even if later code redefines HEAD to mean > something else. Just make sure you have a means to test the earlier > HEAD. I was once into TLA's for practically everything, variables, functions names, the lot. In recent years I've tended to go for more verbose but much more readable meaningful stuff, makes the code much more self documenting. What is the official standard for how many letters are significant in Forth these days ? > > 2. Factor more. BEGIN this WHILE that REPEAT (what's with the UNTIL > THEN?) where this and that are separate words. When you find yourself > using 6 PICK, you know it's time to re-factor. The 'until then' lets me not have to do a '0= while then' I can drop the 0= and just do 'until then' ? Is this a bad thing ? Seam's I'd need the extra 'then' in both cases. I'm not convinced about refactoring in this case ! And I'm not convinced about the rabid dislike of PICK ! This is no worse than what a C compiler would do to accsess the paramaters of a function ? IF I had an auto inlining optimizing compiler then yes, I'd factor it more, but I don't and most Forth's arn't ! So I'd like to get reasonable speed with the simple compiler I've created. Chris