6 comments

[ 2.9 ms ] story [ 23.8 ms ] thread
Why does Javis use `act!(object, action)` rather than making actions callable structs so you could do `action(object)` ?
(comment deleted)
Might make it easier to dispatch on both the object and the action? Just a wild guess.
Right, can't to abstract callable overloads in older versions of julia
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()