Command line arguments

gwyn at brl-smoke.UUCP gwyn at brl-smoke.UUCP
Sun Mar 9 08:20:57 AEST 1986


There have been articles recently pointing out that there is no
"command line" in an icon-driven environment.  I believe some of
the articles have missed the point about argv (which was the
original topic of discussion).  According to X3J11, there are
two possible conforming C environments:  "hosted", which must be
able to provide program arguments (NOT repeat NOT "command line"
arguments) and receive exit status, and "free-standing", which
need not even have a main() function, let alone program
arguments.

It is of course possible to implement C in an icon-oriented
environment as a "free-standing" implementation.  Generally,
one will need special library routines to access data objects
anyway in such an environment, so transportability is not a big
issue in this case.  Process interface characteristics will
depend on the specific operating environment in a non-portable
way.

Another possibility is to provide a "hosted" implementation in
the icon-oriented environment.  In this case, there must be an
automatic mapping of icon-selected entities into character
strings for the argv array supplied to main().  This may or may
not fit into existing icon interface schemes.  All this means
is that it may not be possible to advertise a conforming
"hosted" implementation of C in such an environment.  I see no
problem with that; if the UNIX-like software tool model doesn't
fit, don't use it.

If you're going to write programs for an object-oriented
environment, how about using an object-oriented programming
language rather than C.  Better yet, how about generalizing
a la Alan Kay to an agent-oriented environment with an
appropriate user interface.  Other than for implementing the
environment itself, one might then be able to do without
"programming languages" altogether.



More information about the Comp.lang.c mailing list