[sdiy] IN your mind, what is ....

Michael E. Caloroso analoguediehard at att.net
Tue Feb 3 23:32:19 CET 2004


Which is a great feature is you want reentrant functions, which 1) is 
not very often and 2) consumes memory each time you build a data 
structure.  This is a no-no in embedded applications because it leads to 
bloatware.

I'm all for C's convention of call-by-reference for functions.  It's 
much easier on memory resources.  Most applications do not need the 
sophisication (or obfuscation depending on your POV) that C++ offers.

MC

ChristianH wrote:
> not quite, in this case the struct references a function, it does not
> contain it. The point is that in 
> 
> Christian
> 
> 
> 
> On Tue, 3 Feb 2004 11:23:21 +0100 (CET) Rainer Buchty wrote:
> 
> 
>>>Want an explanation that makes C++ sound good?
>>>
>>>"C structs that can contain functions".
>>
>>Uhm... C structs can contain functions, even without ++. How about
>>something like this:
>>
>>typedef struct mc68cmd_s
>>{
>>        char *mask;
>>        char *mnem;
>>        char *para;
>>        int (*callback)(dispc_t *pc, mc68cmd_s *cmd, int datas[], char *str);
>>        int flags;
>>} mc68cmd_t;
>>
>>People just dislike pointers nowadays :)
>>
>>Rainer
>>
> 
> 
> 
> 




More information about the Synth-diy mailing list