[julia-users] Re: [newb] objects with state

2014-05-07 Thread Mike Innes
As a rule, you generally want to translate object.func(args...) into func(object, args...) State can be kept in the fields of the object, and accessed using the dot-notation as above. Julia doesn't have class-base inheritance but you can still do objects just fine, albeit with slightly

[julia-users] Re: [newb] objects with state

2014-05-07 Thread Johan Sigfrids
Julia does not have classes so in that sense functions and data are separate. What Julia has as objects is composite types where state is maintained in the object. You then define methods on functions outside the type that operate on types. Because of multiple dispatch you cannot tie a

[julia-users] Re: [newb] objects with state

2014-05-07 Thread Neal Becker
Mike Innes wrote: As a rule, you generally want to translate object.func(args...) into func(object, args...) State can be kept in the fields of the object, and accessed using the dot-notation as above. Julia doesn't have class-base inheritance but you can still do objects just