I\'m working on Juno with Julia.
I don\'t know if Julia supports OOP or not.
For example, is there something like class
or struct
of c+
When in doubt, read the documentation...
https://docs.julialang.org/en/v1/manual/types/#Composite-Types-1
Long story short:
struct MyType
a::Int64
b::Float64
end
x = MyType(3, 4)
x.a
EDIT: Methods are defined outside the type definition, e.g.
function double(x::MyType)
x.a *= 2
end
Methods do not live inside the type, as they would do in C++ or Python, for example. This allows one of the key features of Julia, multiple dispatch, to work also with user-defined types, which are on exactly the same level as system-defined types.