Is CLIM possible in C++?

219 views Asked by At

CLIM = Common Lisp Interface Manager, it's like the REPL, ported to the GUI.

Is something like this similar possible in C++? If so, pointers?

Thanks!

2

There are 2 answers

0
Daniel Earwicker On BEST ANSWER

Here's a REPL built atop GNU C++:

http://www.artificialworlds.net/wiki/IGCC/IGCC

There's no reason why it shouldn't work okay these days - it probably builds up a short program from successive statements, which on a modern machine will compile and run to display output in short order.

From the look of the examples, it could use a simple improvement: a line of input with no semicolon should be treated as an expression to be evaluated, so if you want to know the value of a, just enter a and it would be equivalent to:

std::cout << a << std::endl;
0
Chris Hanson On

The way CLIM works does not require a Lisp REPL.

CLIM provides an architecture in which you can define model objects, commands, and presentations, and a standard command loop that applies commands to objects and displays presentations.

CLIM also provides low-level drawing and input abstractions to make it easy to define new presentations and to implement new ways to turn input into commands.

Something that follows this architecture could be built in C++ without needing any sort of "C++ REPL."