|
From:
<br...@ph...> - 2006-04-18 17:53:22
|
Petr Mikulik wrote:
> term->interactive("disable q hotkey")
> term->interactive("make mousing menus disabled")
> term->interactive("make mousing menus enabled")
> term->interactive("raise 5")
> term->interactive("close")
> term->interactive("put ruler")
> term->interactive("change cursor")
The API entry as such may be a good idea. Passing it a command string
as indicated above, however, most emphatically is not. This is an
programming interface, not a user interface. I won't have a secondary
command parser stuck deep inside each of half a dozen terminal drivers.
The mess with all those term->option() parsers is quite bad enough
already --- let's not make that mistake again.
If what the call does can't be parametrized into a usable C datatype (a
couple of enums, one or two optional arguments, that kind of thing),
then this is not API design --- it's an attempt to get away without
actually doing any design.
|