[ecasound] ECI and return types

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: [ecasound] ECI and return types
From: S. Massy (theanaloguekid@tak.net.dhis.org)
Date: Wed Jul 04 2001 - 21:20:07 EEST


Ok,

So far I like how the ECI is being managed; the fact that it heavily
relies on the IAM command subset we all know and love makes it a snap to
fit in any program. Now I've come to wonder: for return types we have,
strings, lists of strings, integers, floats and void-like. Now I've
been thinking this latter type should be replaced with a boolean sort
of type. A classical example of the benefits found in this would be:
I want to connect a chain-setup that the user of the program built in
whole or part, I must:
- check that the cs is valid (cs-is-valid)
- connect the chain-setup (cs-connect)
- check that everything really went as expected (cs-connected)
- if not right, then check what's up (last_error())

Now this could have been shortened if cs-connect could have told me by
itself if it had succeeded or not.
something like:
if (cs-is-valid && cs-connect) {
        do stuff...
} else {
        investigate and report...
}

In a lot of case this could make error checking/foolproofing easier,
in most obscure cases it might be good for debugging.

What do you think?

--
To unsubscribe send message 'unsubscribe' in the body of the
message to <ecasound-list-request@wakkanet.fi>.


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Jul 04 2001 - 21:21:15 EEST