Should `type` and `typeOf` be something like `getType` and `isTypeOf`?

Issue #705 wontfix
created an issue

I guess it would be consistent with the API if Object:type and Object:typeOf were named Object:getType and Object:isTypeOf.

Comments (4)

  1. hahawoo reporter

    Ah, I, did, not, think of that. :D

    Just throwing this out there, but... are those getTypes necessary?

    For example, love.physics.newCircleShape(1):getType() returns "circle", but love.physics.newCircleShape(1):type() returns "CircleShape", so are the physics getType methods kind of redundant? And the type of a Source can already be determined by isStatic, and for Canvases, um, isHDR? :D I have no idea.

  2. hahawoo reporter

    I'm not so sure about this one.

    As well as the mentioned getType functions already existing, maybe the type of a object isn't really part of the object's state, so it's okay that it's different, or maybe even good that it looks different.

    And plus type and typeOf just kinda look cool. :P

  3. Log in to comment