ForthHub / discussion

Discussion repository for Forth enthusiasts.
116 stars 4 forks source link

Desktop Forth system requirements #83

Open ruv opened 4 years ago

ruv commented 4 years ago

I suggest to figure out some conventional requirements to the desktop Forth systems. See the initial version at wiki. Please, share you ideas.

iru- commented 4 years ago

Regarding the points you described on the wiki page, I agree with most of them. Some minor comments:

  1. Agreed, and why care about the nature of standard input at all? 6.i What about processing a single file? If you need multiple files to be included, write a load file and include it. 6.ii can be removed, (4) takes care of that. 6.iii and iv can be removed in favor of forth words that do the same and are called from a pipeline.

My comments are only opinions, of course. No hard truth about them.

By the way, @ruv's ideas plus my comments are mostly implemented in nop.

ruv commented 4 years ago
  1. Some forth systems don't pass the mentioned testcase: echo "2 3 + . " | forth. OTOH, pipe in STDIN means batch mode, so a Forth system should be quiet. It is useful for scripting. Sometimes the output should be fully controlled by a script.

  2. The idea is to have not a minimal API, but to have a conventional API. It it common for the script engines to accept a file in the command line, and even several files. Also, "help" and "version" options are well known and wide supported (it certainly does not exclude words like help and version).

Regarding nop system — it could be more useful if it would be closer to the standard Forth.