On 08/07/2011 10:05 PM, Paul Coccoli wrote:
> On Sat, Aug 6, 2011 at 6:10 PM, Florian Paul Schmidt
> <mista.tapas@email-addr-hidden> wrote:
>> On 08/07/2011 12:06 AM, Florian Paul Schmidt wrote:
>>> Actually, type safety would go out of the window, as the signature of a
>>> function is not really apparent from the symbol table. So some caution would
>>> have to be used when sending commands, making sure that the types of
>>> arguments are right. Before creating the boost::bind functor the raw
>>> function pointer from dlsym would have to be cast to the right type.. Maybe
>>> boost::bind would be the wrong approach here alltogether.. Will need to
>>> think about it a bit more..
>> OMG, could this be the one single place where polish notation would have a
>> place? To clarify: Encode the signature of functions in the name of the
>> function and restrict yourself to several function signatures that cover the
>> kind of functions you want to expose. Then you could cast into the
>> appropriate type and again use boost::bind..
>>
>> Ugly, am I on crack? Who knows? Going to party now. Laters,
>>
>> Flo
> In C++, isn't the signature of the function encoded in the symbol
> table via name mangling?
>
> This is not meant to imply that I think this is good idea...
True, except for the return type (as it's not used for function
dispatching in C++). I guess if one really wanted one could try to do
something crazy like that.. I don't know though, if the generity of the
approach really counterweights the potential hazards.. :D
Flo
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Mon Aug 8 00:15:03 2011
This archive was generated by hypermail 2.1.8 : Mon Aug 08 2011 - 00:15:03 EEST