> So far so good; this is just like a DOES> word. The problem comes with
multi-action words in which the programmer writes something like this:
>
> MY-DEFINER XXX &XXX XXX++ XXX--
>
> That is requiring the programmer to know all of the helper words that will be
generated and get them in the correct order. That shouldn't be his job. He
should just provide the single name XXX and let MY-DEFINER derive the helper
word names from the XXX by pasting on suffixes and prefixes as needed.
>
Yes that wouldn't work well, and I don't think it was Mitch,s intention. Since
Forth already uses prefixes to distinguish multiple actions, perhaps the
cleanest syntax would be
xt <prefix> ACTION <actor-name>
where ACTION associates an existing prefix with all future words defined by an
existing actor name.
Author ... Hugh Aguilar Note: This is changed to be an RfD rather than a CfV. Problem ... This works on a system in which code space and data space are...
... No, that's not the solution. CREATE DOES> is standard, used by many programs and systems, and can't be changed. The solution is to add another word, e.g. ...
... The first appearance of BUFFER: that I know of was in my Open Boot implementation for Sun SPARCstations. I needed a convenient way to allocate...
Mitch Bradley
wmb@...
Jun 30, 2009 1:22 pm
Your LABEL and BUFFER words aren't a solution because they break the existing code that uses CREATE to define a buffer of memory. A typical example would be. ...
... In the first place, the word that Mitch and others are referring to is BUFFER: (it's been around since the 80's). It can coexist with CREATE ... No code...
... No, this wouldn't have to be changed. The code with CREATE still works, it just has a little more overhead than the BUFFER: solution. You only have to ...
It's not just the source code that is broken, it's the documentation too. Documentation that changes for life-critical applications has to be re-submitted -...
... I like your idea. You would make it easier to build optimising Forth compilers, and also make the language make more sense. I believe the problem for...
I apologize to Stephen Pelc for crediting him with the idea of introducing <BUILDS for use with DOES>, but also allowing CREATE to still be used in this manner...
... That expectation does not agree with my expectation at all....
Mitch Bradley
wmb@...
Jul 2, 2009 4:13 pm
... No, it is not okay. It appears that you have not been following the Forth200x process and have not read the current draft as your expectations seem to be...
... This is why it was mandated that DOES> is only guaranteed to work with CREATE, not with other defining words. Operationally, FORTH, Inc. and most other...
... Having spent years creating documentation for medical products I wholeheartedly agree with Elisabeth. The last thing the community needs is for Forth to...
Posted by: "Hugh Aguilar" ... Rubbish. VFX treats children of CREATE as CONSTANTs. It can also optimise the DOES> clause such that when DOES> x + @ ; is the...
... Of course there is. bigForth and gforth-fast detect CREATE in COMPILE, and compile a literal when it's a CREATE without DOES>. VFX Forth does the same ...
... Win32Forth also treats CREATEd words with no DOES> as literals ( and also objects, CONSTANTs and all types of variable ). The trick is CREATE sets the...
Having a word perform two disparate functions is bad design. Everybody knows that! The well-known proverb is: "Let the dictionary do the deciding" (see the...
... OK. Overloading CREATE was a bad idea from the beginning, but it's too late to fix the problem now and most compiler-writers have adapted to handle it. One...
... How do you figure CREATE is "overloaded"? Cheers, Elizabeth -- ================================================== Elizabeth D. Rather (US & Canada)...
Here is my swag at the right way to do DOES>. I don't mean DOES> exactly, but rather the abstract thing that DOES> does. (How's that for an obtuse...
Mitch Bradley
wmb@...
Jul 8, 2009 3:42 am
... align here <builder-stuff> ['] MY-ACTION ACTOR: ; ... This technique can also be varied to not work with addresses, but directly with the data (where it is...
Anton Ertl
anton@...
Jul 8, 2009 1:28 pm
This looks interesting. I agree with what you say about DOES> being odd. In any case though, the action and the builder parts are going to execute at different...
... Yes that wouldn't work well, and I don't think it was Mitch,s intention. Since Forth already uses prefixes to distinguish multiple actions, perhaps the...
Mitch Bradley's idea was good, and your idea is also good. That's the funny thing about Forth programmers --- they are always coming up with good ideas. The...
... CREATE always had to work with ;CODE anyway, so whoever thunk of using an assembler call instruction to locate the code (at least in ITC Forths) did us all...
... The innovation you mention was the work of Dean Sanderson, at FORTH, Inc., in the early 80's. Thank you for pointing out that CREATE hasn't changed and...
... Stephen said no such thing! What I said was that <BUILDS ... DOES> may have some merit, but that Hugh has provided no numeric evidence for his assertions....
This is long and philosophical, I intended it primarily for Hugh Aguilar and posted it here in case it amuses someone. It does not need careful attention as...