Javis.jl – Julia Animations and Visualizations
1–7 of 7 posts
Re: Javis.jl – Julia Animations and Visualizations
#2Why does Javis use `act!(object, action)`
rather than making actions callable structs so you could do
`action(object)` ?
Re: Javis.jl – Julia Animations and Visualizations
#3Why does Javis use `act!(object, action)` rather than making actions callable structs so you could do `action(object)` ?
[deleted]
Re: Javis.jl – Julia Animations and Visualizations
#4Why does Javis use `act!(object, action)` rather than making actions callable structs so you could do `action(object)` ?
Might make it easier to dispatch on both the object and the action? Just a wild guess.
Re: Javis.jl – Julia Animations and Visualizations
#5Why does Javis use `act!(object, action)` rather than making actions callable structs so you could do `action(object)` ?
Julia is not object-oriented. If you want to dispatch on the type of action, you include it in the method signature.
Re: Javis.jl – Julia Animations and Visualizations
#6Why does Javis use `act!(object, action)` rather than making actions callable structs so you could do `action(object)` ?
Julia is not object-oriented. If you want to dispatch on the type of action, you include it in the method signature.
Actually, callable structs are a common pattern in Julia, and are not in opposition to multiple dispatch.
You are probably thinking of dot-method syntax, like this
object.action()