Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth Mac > Re: Naming of S...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 11 of 17 Topic 129 of 159
Post > Topic >>

Re: Naming of Standard words

by "J Thomas" <jethomas5@[EMAIL PROTECTED] > Oct 5, 2006 at 05:13 AM

ward mcfarland wrote:
> slava@[EMAIL PROTECTED]
 <slava@[EMAIL PROTECTED]
> wrote:
>
> > In Factor (which is definitely not an ANS Forth) I use the convention
> > that parsing words which read ahead from the input have names ending
> > with a colon. I find it makes code easier to follow.
>
>
> I find myself liking this style for words that require a termination
> word.
>
> While I have no problem with CREATE VARIABLE VALUE  etc  since they do
> not need a completion word.

I would like to start using some naming convention for parsing words
that don't use a termination word. Just to remind me that they *are*
parsing words. Of course we already have a collection of standard
parsing words that have no common naming convention. And we have
parsing words that imply their terminator like .( and ." . So it would
be hard to make it consistent.

What I see already is:

FOO:  .... ;FOO  for things that make new words.
FOO"  .... "      for things that parse to a "
FOO(  .... )      for things that parse to a ) , usually they don't
compile

:NONAME is unfortunately not named NONAME: . I can live with that.

Of course you can give things whatever names you want. You can start
your project with a prologue

alias noname: :noname
alias endif then
alias create~ create  \ is ~ a good convention for a parsing word that
quits on space after nonspace?
alias ....

But that makes it harder for other people to read your code, unless
enough of them copy your naming conventions. The requirement that other
people should be able to read your code easily will tend to keep
standard Forth poised around the early 1990's. But it's sometimes a
useful requirement despite that.
 




 17 Posts in Topic:
RfD: Third draft of Structures
stephenXXX@[EMAIL PROTECT  2006-08-30 10:03:23 
Re: RfD: Third draft of Structures
anton@[EMAIL PROTECTED]   2006-09-02 16:25:43 
Re: Third draft of Structures
"Charles Melice"  2006-10-03 16:25:26 
Re: Third draft of Structures
"jacko" <jac  2006-10-03 15:23:33 
Re: Third draft of Structures
"Charles Melice"  2006-10-04 14:23:36 
Naming of Standard words
"Ed" <nospam  2006-10-05 12:34:42 
Re: Naming of Standard words
"Charles Melice"  2006-10-05 11:29:08 
Re: Third draft of Structures
"jacko" <jac  2006-10-03 15:32:49 
Re: Naming of Standard words
"slava@[EMAIL PROTEC  2006-10-04 20:32:28 
Re: Naming of Standard words
ward@[EMAIL PROTECTED] (  2006-10-05 07:01:33 
Re: Naming of Standard words
"J Thomas" <  2006-10-05 05:13:43 
Re: Naming of Standard words
"slava@[EMAIL PROTEC  2006-10-05 10:45:16 
Re: Naming of Standard words
Elizabeth D Rather <er  2006-10-05 12:19:50 
Re: Third draft of Structures
"Ian Osgood" &l  2006-10-20 07:19:16 
Re: Third draft of Structures
Bernd Paysan <bernd.pa  2006-10-20 18:18:21 
Re: Third draft of Structures
"Ed" <nospam  2006-10-23 15:10:40 
Re: Third draft of Structures
"Tim Trussell"   2006-10-23 08:19:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 22:17:02 CDT 2008.