I believe you would need field access overloading for this to work 
cleanly: https://github.com/JuliaLang/julia/issues/1974

On Wednesday, May 4, 2016 at 11:03:18 AM UTC+2, Yonghee Kim wrote:
>
> I'd like write a simple log when type field value has changed
>
> something like this
> type Item                   
>     id::Int32                    
>     count::UInt32             
>                                          
>     # function for writing a log
> end                                    
>  
>
> then when I do this...
> *   a = Item(1, 1)                  *
> *   a.count += 10            *
>
> write a message like this at console 
> *  Item "a.count" value +10                 *
>
>
> Is it possible? or should I make macro to do this. 
>

Reply via email to