Can someone help me understand the difference? I understand the concept from object oriented languages, but there are a few things from the documentation I don’t understand.
For example
struct Point{T}
x::T
y::T
end
This is a composite type, but to me its also “abstract” since you can create a Point
object of any primitive type. Soon after the documentation talks about
abstract type Pointy{T} end
struct Point{T} <: Pointy{T}
x::T
y::T
end
I dont understand why this is neccessary. Is it performance reasons? Should I be creating an abstract type for every concrete type I want to use? What if its a mutable struct
?
Thanks