They’re functionally the same. Compiler knows the type of the two instance variables in the first example because they’re declared explicitly. In the second example it can infer it from the parameter type restrictions.
Tho I would say the more idiomatic approach would be like:
class Person
getter name : String
getter age : Int32
def initialize(@name : String, @age : Int32); end
end