Re:Command line interfaces are reified UIs
by kazinator on Friday November 03, 2017 @06:46PM
(#15622720)
"Reification" has a fairly clear meaning in CS: basically, it refers to a situation when some feature in a language is made available as a value that can be "passed around" in the program and used somehow. Closures are a reification of functions and lexical environment; continuations a reification of control flow, etc. Classes can be reified as objects, so that we can receive a class as an argument and ask that class to spin off an object of the type that it represents. The va_list type in C reifies function arguments (at least the trailing ones, of a variadic call) so then they can be passed to another function or functions.
We can take as our model of a simple UI the "dialog box", in which a user can prepare some inputs, and then submit. The "dialog box" corresponds to a function with arguments, and the sumbmission is a function call. So of course, in an underlying programming language, the equivalent can be reified as a first class function.
Even a relatively unsophisticated textual CLI can "reify" that at least by turning the concept of a "command" into a string value: there can be a variable that can hold a command, which can be passed around, dynamically calculated and altered, and executed.
The UI usually has no straightforward equivalent of "generate 100 instances of this dialog box invocation, feeding successive values from this list into the ID field ...".
That sort of "reification" can occur with tools that automate the generation of events into the windowing system.
Graphical frameworks in which you can make "actor" objects and hook them up are kind of a reification of the GUI.
We can take as our model of a simple UI the "dialog box", in which a user can prepare some inputs, and then submit. The "dialog box" corresponds to a function with arguments, and the sumbmission is a function call. So of course, in an underlying programming language, the equivalent can be reified as a first class function.
Even a relatively unsophisticated textual CLI can "reify" that at least by turning the concept of a "command" into a string value: there can be a variable that can hold a command, which can be passed around, dynamically calculated and altered, and executed.
The UI usually has no straightforward equivalent of "generate 100 instances of this dialog box invocation, feeding successive values from this list into the ID field ...". That sort of "reification" can occur with tools that automate the generation of events into the windowing system.
Graphical frameworks in which you can make "actor" objects and hook them up are kind of a reification of the GUI.