[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: comments on version 2 of protocol draft
>>>>> On Tue, 2 Mar 2004 21:02:25 -0500, Bobby Krupczak <rdk@krupczak.org> said:
Bobby> In general, most APIs will have arguments.
Protocols look like they compare nicely to APIs on the surface, but
they don't. They are very different beasts.
Bobby> Defaults often take the form of passing null value. In this
Bobby> case, passing "value" instead of "NULL" seems to be no easier
Bobby> or worse.
If you study most APIs, somewhere below the surface they do make
assumptions and provide defaults even if the defaults weren't encoded
directly as parameters. printf assumes you want to print to stdout
and you have to use a different API to do otherwise. open() assumes you
want to use basic read() type calls to access the data, and you have
to use fopen or xml_parse to get something else.
Protocol operators are not like APIs because you're discussing a fewer
number of API like operations, because the optional parameters (IE,
default enabled attributes) contained within frequently change the API
itself that is being called within the implementation.
I don't think I've expressed this well, because I'm tired and because
they really don't compare well under the hood.
Bobby> Not having defaults does, however, make the code
Bobby> "easier" for the application programmer to read.
Sometimes. Sometimes it bogs the screen down so much with overhead
that you can't get as good as a grasp on what is going on. Forced
clutter does not make things easier to read.
--
"In the bathtub of history the truth is harder to hold than the soap,
and much more difficult to find." -- Terry Pratchett
--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>