Sounds like you might want to explore Forth a bit. Punyforth on the ESP8266 is a convenient way to try get started hands-on, Jonesforth if you want to learn how you could go about implementing one.
On bigger devices (PC/SBC/...) with an OS, Tcl/Tk is a wonderfully effective programming tool!