Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
Javis.jl – Julia Animations and Visualizations
(opens in new tab)
(youtube.com)
44 points
thecedarprince
4y ago
5 comments
Save
Share
5 comments
5 comments · 1 top-level
top
newest
oldest
oxinabox
4y ago
· 4 in thread
Why does Javis use `act!(object, action)` rather than making actions callable structs so you could do `action(object)` ?
Mageek
4y ago
Julia is not object-oriented. If you want to dispatch on the type of action, you include it in the method signature.
DNF2
4y ago
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()
StefanKarpinski
4y ago
Might make it easier to dispatch on both the object and the action? Just a wild guess.
oxinabox
4y ago
Right, can't to abstract callable overloads in older versions of julia
j
/
k
navigate · click thread line to collapse