Jump to content

Julia: Difference between revisions

61 bytes added ,  18 September 2019
no edit summary
(Change activate("./") to activate(@__DIR__))
No edit summary
Line 185: Line 185:
===Object Oriented Programming===
===Object Oriented Programming===
Julia is a [https://en.wikipedia.org/wiki/Multiple_dispatch Multiple Dispatch] language.<br>
Julia is a [https://en.wikipedia.org/wiki/Multiple_dispatch Multiple Dispatch] language.<br>
You can use a <code>struct</code> in place of classes and define functions which have your struct as a parameter in place of methods.<br>
You can use a <code>struct</code> in place of classes and define methods which use your struct as a parameter.<br>
You can find all definitions of a function using the <code>methods</code> function.
For example:
For example:
<syntaxhighlight lang="julia">
<syntaxhighlight lang="julia">