Hi Robert,

I think the solution to your problem is to stop working with the fields of 
types and instead focus on functions. A class method then just becomes a 
constant function that takes in an object of type T.

Hope that helps.

 - John

On Nov 25, 2014, at 1:00 PM, Robert Gates <[email protected]> wrote:

> Hi Julians:
> 
> I'm still new to Julia and am having a little trouble correctly understanding 
> composite types. I would like to create a composite type with a mixture of 
> constant attributes, i.e. class attributes, and mutable attributes. In 
> practice, the problem is that I need to instantiate many, e.g. 10e8, type 
> instances and would like to avoid having to allocate memory for values which 
> are constant over a large subset of these instances. Is there any way to do 
> this correctly?
> 
> Thanks for your help!
> 
> Robert

Reply via email to