Replies: 4 comments 14 replies
-
GForth offers a composable alternative: |
Beta Was this translation helpful? Give feedback.
-
For the
What
|
Beta Was this translation helpful? Give feedback.
-
The word "build" is not very suitable. In computing, it has a strong connotation of compilation from sources (as a verb) and a connotation of versioning (as a noun). Which of the following options do you like more?
|
Beta Was this translation helpful? Give feedback.
-
In some Forth systems it's impossible to define a word : foo 123 ;
t{ ' foo s" bar" enlist-definition -> }t
t{ ' bar ' foo = -> true }t Because this test requires that the Forth system be able to associate the same xt with several Forth words (name tokens), but in some systems this is impossible due to their internal design. Well, technically you can add such association anyway by redefining On the other hand, if the Forth system provides create foo 123 ,
synonym bar foo
t{ ' bar >body ' foo >body = -> true }t |
Beta Was this translation helpful? Give feedback.
-
There is a well known word
alias ( xt "name.new" -- )
that creates a Forth word with the specified name and xt. This word accepts the name from the input buffer. I need a factor for this word that accept all arguments from the stack. Also, I need a factor for the standard wordsynonym ( "name.new" "name.old" -- )
.How to name these factors? Which order of arguments is better?
I think about:
build-name ( xt sd.name -- )
build-synonym ( nt sd.name -- )
The created name token can be obtained by
latest-name
.So these words can be used as:
Beta Was this translation helpful? Give feedback.
All reactions