# requires Ruby 3.2 or newer
# *** before: ***
PointOld = Struct.new(:x, :y, keyword_init: true) # keyword-only had to be
#explicit
# *** in version 3.2: ***
Point = Struct.new(:x, :y)
puts Point.new(1, 2).inspect # positional still works
puts Point.new(x: 1, y: 2).inspect # and so does keyword init, automatically