To do something like this in Julia, there are several possibilities, 
depending what you want to achieve. You could

abstract Cat # we decide hat cat will always have an age variable

type Tiger <: Cat
  age::Int
end

meow(c::Cat) = println(c.age)

# then you can
tigre = Tiger(5)
meow(tigre)


Reply via email to