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


Groups > comp.lang.forth > #14293

Re: :NONAME a different viewpoint

From Aleksej Saushev <asau@inbox.ru>
Newsgroups comp.lang.forth
Subject Re: :NONAME a different viewpoint
Date 2012-07-23 05:35 +0400
Organization A noiseless patient Spider
Message-ID <87r4s3mf8k.fsf@inbox.ru> (permalink)
References <m7kgzg.fyf@spenarnc.xs4all.nl> <87wr1vpusz.fsf@inbox.ru> <jui285$5hm$1@speranza.aioe.org>

Show all headers | View raw


"Rod Pemberton" <do_not_have@notemailnot.cmm> writes:

> "Aleksej Saushev" <asau@inbox.ru> wrote in message
> news:87wr1vpusz.fsf@inbox.ru...
>> Albert van der Horst <albert@spenarnc.xs4all.nl> writes:
>>
>> > I would greatly prefer  (: .... ;) .
>>
>> It is really bad idea to use anything containing ")" when
>> you lack proper lexer.
>
> Why exactly is it a bad idea to use ) with Forth's space delimited lexing?
> You're not placing (: ... ;) inside of comments ( ... ) are you?  A space
> delimits every token including (: and ;) except for a few Forth words that
> find their own delimiter.  So, a ) shouldn't be matched unintentionally, as
> long as you avoid placing (: ... :) in the self-delimited words which use )
> as a delimiter.  Those are the two Forth words ( and .(   So, you should
> only have to avoid ( comments and .( for display for proper use of (: ... :)

Perhaps, you don't write programs long enough to bother with commentaries,
or you like to track everything you comment off, or you never comment
part of code off, I don't know. But many other people do comment their code,
and do comment parts of code off regularly. Forth is already broken enough
to use that common delimiters for commentaries, you don't really need to
make things worse.

Besides, in this case all you need is reenterable compiler (this isn't
quite trivial thing in Forth already but anyway), so that you could write

:noname ... [ :noname ... ; ] literal ... ;

Thus, square brackets indicate better what's going on.

(Making compiler operate in dynamically allocated memory is even more
complicated, given Forth's aversion of dynamic memory in general.)


-- 
HE CE3OH...

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


Thread

:NONAME a different viewpoint Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-22 14:45 +0000
  Re: :NONAME a different viewpoint Aleksej Saushev <asau@inbox.ru> - 2012-07-22 21:30 +0400
    Re: :NONAME a different viewpoint "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-07-22 19:28 -0400
      Re: :NONAME a different viewpoint "Elizabeth D. Rather" <erather@forth.com> - 2012-07-22 14:14 -1000
        Re: :NONAME a different viewpoint Alex McDonald <blog@rivadpm.com> - 2012-07-23 04:28 -0700
      Re: :NONAME a different viewpoint Aleksej Saushev <asau@inbox.ru> - 2012-07-23 05:35 +0400
        Re: :NONAME a different viewpoint Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-23 15:38 +0000
    Re: :NONAME a different viewpoint Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-23 03:24 +0000
      Re: :NONAME a different viewpoint Aleksej Saushev <asau@inbox.ru> - 2012-07-25 03:02 +0400
  Re: :NONAME a different viewpoint "A. K." <akk@nospam.org> - 2012-07-23 07:48 +0200
    Re: :NONAME a different viewpoint Paul Rubin <no.email@nospam.invalid> - 2012-07-22 23:01 -0700

csiph-web