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