[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Configuration management, revision 3



On Wed, Jul 29, 1998 at 10:56:46PM -0700, Joey Hess wrote:
> It already has if statements.

No, no, no, no, no!

The language I described doesn't have any statements at all, not if
statements nor any other statements.  You would need a flow of control
for having statements.  But no flow of control is defined in the
semantics of the language!

Consider the sample I posted:

(if (yes? metoo/foo)
  ((datum metoo/foo2
     (type yesno)
     (query "Do you want me to do foo2 as well?")
     (default no))
   (datum metoo/foo3
     (type yesno)
     (query "What about foo3?")
     (default yes)))
  (datum metoo/bar
    (type yesno)
    (query "Well then do you want me to do bar?")
    (default yes)))
(datum metoo/foo
  (type yesno)
  (query "Do you want me to do foo?")
  (default yes))

To emphasize my point I have moved the datum metoo/foo to the end.
This variant is semantically equivalent to the original.

The excerpt merely describes a data structure: a list of data, or
aggregates:

   metoo/foo
   metoo/foo2
   metoo/foo3
   metoo/bar

They are all there at all times.  Now, the conditional describes a
relationship between these data.  It says that metoo/foo2 and
metoo/foo3 are relevant if metoo/foo is "yes" and that metoo/bar is
relevant if metoo/bar is "no".  By a natural implicit assumption,
these ifs are really iffs in this case, and we can deduce that
metoo/foo2 and metoo/foo3 are irrelevant when metoo/bar is "no".

The frontend takes this data and arranges to fetch answers.  The
method it uses for doing that is dependent on its design.  I will
consider only the lineconfig and the kitchen sink I described in my
original post.

The citchen sink will arrange a window in X to contain the data along
with appropriate checkboxes.  The conditional clause causes it to
disable those checkboxes that are not relevant given the states of the
other checkboxes.  For example, the metoo/foo checkbox is initially
unchecked, so metoo/foo2 and metoo/foo3 are disabled and metoo/bar is
enabled.  When the user checks metoo/foo, the kitchen sink will
obediently flip the switch, disabling metoo/bar and enabling
metoo/foo[23].  If he decides to re-uncheck metoo/foo, the switch is
flipped again.

There's no way this language could be used to dictate the flow of
events in the process of selecting a configuration.  All it can do is
forbid certain combinations, but even that feature cannot be exploited
to control the flow of events.



        Antti-Juhani
-- 
Antti-Juhani Kaijanaho <gaia@iki.fi> ** <URL:http://www.iki.fi/gaia/> **

         I can't seem to find a lowercase 'r' on my keyboard.
        (Lee Davies in comp.unix.programmer on July 22, 1998)


--  
To UNSUBSCRIBE, email to debian-policy-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: