Yesterday Matt Zimmerman wrote: | | On Sat, Mar 03, 2001 at 11:56:14AM +0100, Tobias Oetiker wrote: | | > An other question I am thinking about is the interface for passing data to | > the modules ... at the moment this is done with ARGC/ARGV which is ideal for | > command line interfaces. But with perl and other language bindings in the | > picture, it might make sense to allow typed information to be passed directly | > to the modules ... any ideas on this ? | | The argc/argv style seems to confuse people who are expecting a more | traditional library API, especially when using the C library directly. The | programmer is required to build up a list of command-line-style strings, where | multiple typed arguments and/or arrays would be more natural, and would | probably require the programmer to do less conversion from their internal data | types. For example, an update would more naturally be done as | | rrd_update(timestamp, datasources...) | rrd_update(timestamp, array_of_datasources) | | or even multiple calls to: | | rrd_update(timestamp, datasource, value) | | Building up the strings required by the current interface is easy and natural | in Perl, but generates a lot of excess code in C.
it is also difficult in the perl bindings ... so if you can suggest how calling of functions with an excessive ammount of flexible paramters can be done otherwhise I would be more than happy to know ... I completely lack experiance in this field ... cheers tobi -- ______ __ _ /_ __/_ / / (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich / // _ \/ _ \/ / TEL: +41(0)1-6325286 FAX:...1517 ICQ: 10419518 /_/ \.__/_.__/_/ [EMAIL PROTECTED] http://ee-staff.ethz.ch/~oetiker -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-developers WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
