Re: The IMMEDIATE mess



J Thomas wrote:
Andrew Haley wrote:
J Thomas <jethomas5@xxxxxxxxx> wrote:

....

Andrew is doing a fine job with this topic, I just want to add a bit.

IMMEDIATE is adequate to a lot of tasks. If you want a word that only
makes sense in compile state, then you can make it with IMMEDIATE . And
you can use your innate good sense not to use it except in compile
state.

If you want the same name to show two different behaviors, one in
interpret state and one in compile state, pretty much your only
portable choice is to write a state-smart word with all the
disadvantages that come with that.

Agree entirely. In 35 years I've yet to have a problem with IMMEDIATE. In fact, I've been at a loss to understand what "mess" it is you're worried about.

There are two kinds of disadvantages to state-smart words. One kind

...
So I want to find a way to add the features I want instead of get rid
of existing features. Then as the body of code that uses the old
features ages and code that uses the new features builds up, future
standards can consider those old features obsolescent and finally get
rid of them completely.

What I want is increased ability to choose what to do with a word, at
lookup time.

Known methods that can get this include:

[list snipped]

On the other side there's the question whether these capabilities are
worth having. In each case, it could be argued that they give
programmers too much power. If you give Forth programmers power,
they'll use it.

They'll extend the language in new and tricky ways. A standard does
more than code portability, it also provides programmer portability,
and the more tricky code that's hard to understand, the less
interchangeable the programmers.

You're talking about Tom Cruise-type hot-shots who have to show off. They probably exist in every language, and are mostly anathema to serious folks just trying to get work done. I object both to adding features that cater to the hot shots, and equally to efforts to thwart them that have the side-effect of hampering the ability of the serious professionals to get their work done.

...

It's possible I want things I shouldn't want.

Entirely possible. It seems to me that you're being excessively theoretical in imagining problems where none exist on this issue.

Cheers,
Elizabeth

--
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310-491-3356
5155 W. Rosecrans Ave. #1018 Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================
.



Relevant Pages

  • Re: The IMMEDIATE mess
    ... The ARM cpu needs not a STACK nor STATE nor compile time ... makes sense in compile state, then you can make it with IMMEDIATE. ... So I want to find a way to add the features I want instead of get rid ... If you give Forth programmers power, ...
    (comp.lang.forth)
  • Re: How C is better then C++
    ... Each language has its strengths and weaknesses, and for each of those languages there are some contexts where it's advantages make it the superior one; and there are additional context where neither language is appropriate ... While most C++ programmers use only a limited subset of C++ features that may, in itself, be no more complicated than C, anyone who intends to do maintenance work on C++ code written by someone else will have to be at least familiar with every feature that the other person might choose to use. ... However, the designers of C++ were not idiots; most of the additional features of C++ were designed with the explicit intent of making it easier to avoid making particular types of errors, when those features are used correctly. ...
    (comp.lang.c.moderated)
  • Re: Intro to Programming w/ Machine Language
    ... >) While it's clear that correcting bugs should have the highest priority, ... programmers who think this way simply don't write ... features, and so on when you consider the product's life cycle. ... Ocomplexity is irrelevant. ...
    (alt.lang.asm)
  • Re: Whats the deal with C99?
    ... 1) attempt to assess the implementability of C99. ... And finally they did not 3) seek to encode features ... that programmers need or want. ... The committee was reacting to ...
    (comp.lang.c)
  • Re: Intro to Programming w/ Machine Language
    ... >) While it's clear that correcting bugs should have the highest priority, ... programmers who think this way simply don't write ... features, and so on when you consider the product's life cycle. ... Ocomplexity is irrelevant. ...
    (comp.programming)