On 13 Oct 2000, Lars Gullik Bjønnes wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
>
> | On Fri, 13 Oct 2000, Jean-Marc Lasgouttes wrote:
> | > >>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> | >
> | > Lars> You mean so that we can have a centralized testing at the top of
> | > Lars> the function?
> | >
> | > I'm not sure what I mean exactly, but we could declare the arguments
> | > of the function so that there type can be checked by dispatch, and the
> | > the func would use string_arg[1], int_arg[2] and the code would check
> | > the function uses the arguments in the way it declared it should.
> | >
> | > Maybe it is not useful, after all. Or too complicated for what it
> | > provides. Anyway, I think we should not need tests at the beginning of
> | > each function.
> |
> | of course, if you used XTL, this is built in...
>
> How?
>
> Remember that you need to input the arg somewhere too, and that I
> should be albel to do things like:
>
> FuncSlot(...).arg("123); // we never really entered a int
How often do you need this?
I'm pretty sure something like that can be done with xtl except you'd
really use an int instead of a string to make an int.
> int i = stream_cast<int, string>(fs[1]);
Maybe, a stream_cast<> version of XTL would be a better idea. Then we can
use a format of our choice and build exporters/importers in XML and more.
I've been suggesting this for ages now but never got around to trying to
implement the appropriate text export/import format for xtl.
I suspect this has come up in the other thread so I better go read it now.
Allan. (ARRae)