Indexableinstead of x/y/z/w in order to make a mixin that can be added to 2d, 3d and 4d vectors? The short-circuiting behavior of
&&tells me yes
def <=>(other : self) @x <=> other.x && @y <=> other.y end
eachor something from
Indexablerather than the logic explicitly needing to know about the ivars
requiredones are not nilable,
includesome partial types. These modules are never intended to be seen be the user, such as in generated documentation pages with
crystal doc, but I can't exactly make them private either if I want to include them in other modules/types, and protected doesn't seem to work on modules, so I'm not really sure if Crystal has a solution for me...