Re: introducing abstract types to mc



Hello,

On Fri, 24 Sep 2004, Roland Illig wrote:

> Hi,
>
> 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.

> 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.

> example, an abstract type may have some constructors and one destructor.
> As most files cannot access the internal fields of the type, they must
> use a constructor to create a variable of that type. The constructor can
> ensure that all fields get reasonable values. And in case of a
> modification of the type, the number of functions you must look after is
> kept minimal.

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.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]