3 ms·
Not by chance, it seems suitable for the scripting needs of Autocad: - A REPL alone, without defining either primitives from the application side or words on t
by HelloNurse 7y ago
Not by chance, it seems suitable for the scripting needs of Autocad:
- A REPL alone, without defining either primitives from the application side or words on the user side, is already well-formed and very useful, and ready to be incrementally evolved into a very powerful scripting system that can do more with easily understood elementary commands rather than with a complex framework.
- A clearly understood application global state, mostly consisting of a complex document, obviates the need to keep significantly complex data structure on the scripting side, where they would live, at best, in a fragile and unstructured stack.
- Interaction consisting mostly of thinking what to do next, giving commands with a GUI or a REPL and then waiting for computation, rendering and I/O is a good fit for a very terse language with simple interpretation semantics.
- The unstructured nature of Forth-like programs makes high-level specialized commands easy to write, without pointless restrictions and without boilerplate. Narrow commands for specific needs and neat layering of general and abstract commands are compatible and well-supported approaches.