introducing abstract types to mc
Roland Illig
roland.illig at gmx.de
Sat Sep 25 11:14:32 UTC 2004
Pavel Tsekov wrote:
> On Fri, 24 Sep 2004, Roland Illig wrote:
>>I'd like to introduce more abstract types into mc. That is, to separate
>>cleanly which files (or functions) _use_ a data type and which ones
>>_implement_ the basic operation on variables of this type.
>
>
> 'abstract' in what sense ? I looked at the patch and it seems to me that
> the only changes there are changes to the infrastructure. I don't see
> a relation between code organization into files and data type properties.
The data type is what fileopctx.h provides (an uncomplete structure and
some methods to manipulate it). The implementation details are hidden in
fileopctx-impl.h.
>>Using this approach we can quickly tell which functions operate directly
>>on the type. Keeping the number of these functions minimal we have
>>better control of keeping the internal state of these types valid. For
>
> Yep. And also defining a clean inteface for a given data type.
That's exactly what I mean by "abstract".
> It seems like you are suggesting to change the current interface to data
> types to someting like the interface in glib and all related packages.
Yes, that would be nice.
Roland
More information about the mc-devel
mailing list