• Proposal on LATEST-NAME

    From Ruvim@ruvim.pinka@gmail.com to comp.lang.forth on Sun Oct 5 15:25:53 2025
    From Newsgroup: comp.lang.forth

    I have updated my proposal on the `latest-name` and `latest-name-in`
    words. Essentially, I have added a lot of rationale and one very
    portable reference implementation.

    See at <https://forth-standard.org/proposals/new-words-latest-name-and-latest-name-in?hideDiff#reply-1573>

    Please let me know if you have any questions or suggestions on this
    regard. Note that this webpage contains previous versions of the
    proposal above the specified anchor.


    See also a discussion on the same subject in 2023 at <https://groups.google.com/g/comp.lang.forth/c/fjgWq-roR3M/m/QQ4d3VinAgAJ>


    --
    Ruvim

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Sun Oct 5 13:51:36 2025
    From Newsgroup: comp.lang.forth

    On 05-10-2025 13:25, Ruvim wrote:
    I'd be happy to support LATEST-NAME as a preprocessor macro (although I
    doubt 4tH's LATEST is compatible), but I won't be introducing it in the
    native 4tH compiler for the following reasons:

    Moore:

    "There are diverging programming styles in the Forth community. One uses hyphenated words that express in English what the word is doing. You
    string these big long words together and you get something that is quite readable. But I immediately suspect that the programmer didnrCOt think out
    the words carefully enough, that the hyphen should be broken and the
    words defined separately. That isnrCOt always possible, and it isnrCOt
    always advantageous. But I suspect a hyphenated word of mixing two
    concepts."

    Which is part of TF, also tip 5.19 *"Favor short words"*

    .. and LATEST-WORD is not short. We had a good word there, LATEST, which
    I guess does at least 90% of the work proposed, so why not take that one?

    It is a tendency I see within Forth-200x to take longer and longer
    words, just to avoid any collisions with existing words. And I don't
    think that's a smart move.

    What's next? PLACE-IN-STRING? APPEND-TO-STRING? As replacements for
    PLACE and +PLACE?

    Yeah - next proposal is to extend a line in a block to 128 characters.
    If you want to introduce new words, try a thesaurus.

    Frankly, I feel very strongly about names. See: https://sourceforge.net/p/forth-4th/wiki/What%27s%20in%20a%20name%3F/

    Hans Bezemer

    I have updated my proposal on the `latest-name` and `latest-name-in`
    words. Essentially, I have added a lot of rationale and one very
    portable reference implementation.

    See at <https://forth-standard.org/proposals/new-words-latest-name-and-latest-name-in?hideDiff#reply-1573>

    Please let me know if you have any questions or suggestions on this
    regard. Note that this webpage contains previous versions of the
    proposal above the specified anchor.


    See also a discussion on the same subject in 2023 at <https://groups.google.com/g/comp.lang.forth/c/fjgWq-roR3M/m/QQ4d3VinAgAJ>


    --
    Ruvim


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Ruvim@ruvim.pinka@gmail.com to comp.lang.forth on Sun Oct 5 18:38:40 2025
    From Newsgroup: comp.lang.forth

    On 2025-10-05 15:51, Hans Bezemer wrote:
    On 05-10-2025 13:25, Ruvim wrote:
    I'd be happy to support LATEST-NAME as a preprocessor macro (although I doubt 4tH's LATEST is compatible), but I won't be introducing it in the native 4tH compiler for the following reasons:

    Moore:

    "There are diverging programming styles in the Forth community. One uses hyphenated words that express in English what the word is doing. You
    string these big long words together and you get something that is quite readable. But I immediately suspect that the programmer didnrCOt think out the words carefully enough, that the hyphen should be broken and the
    words defined separately. That isnrCOt always possible, and it isnrCOt always advantageous. But I suspect a hyphenated word of mixing two concepts."

    Which is part of TF, also tip 5.19 *"Favor short words"*

    .. and LATEST-WORD is not short.



    We had a good word there, LATEST, which I guess does at least 90%
    of the work proposed, so why not take that one?

    Many Forth systems provide "LATEST", which behaves differently, and
    changing its behavior would be backward incompatible for them.
    Therefore, it's unlikely that vendors will change the behavior of the
    existing word in their system and existing programs that use it (even if
    the behavior difference is only incompatible in some cases).


    Example.
    SP-Forth/4 has provides the word `REQUIRE` since 2001, and it was used
    in thousands of files. Later, a word with the same name but slightly
    different semantics was introduced in Forth-2012. Of course, SP-Forth/4
    cannot provide this word, as this would be backward incompatible change
    for existing programs.



    It is a tendency I see within Forth-200x to take longer and longer
    words, just to avoid any collisions with existing words. And I don't
    think that's a smart move.

    Probably, a better way would be to require systems to provide only
    standard words in `forth-wordlist`, and for programs to *explicitly*
    include a system-specific word list into the search order (if they need
    it). But many people don't like this approach.


    [...]


    --
    Ruvim

    --- Synchronet 3.21a-Linux NewsLink 1.2