Issue #691 resolved

love.physics method naming

created an issue

ChainShape:setPrevVertex isn't so easy to say vocally or subvocally, how about ChainShape:setPreviousVertex?

Because of grammar, returning a single boolean, and consistency with Body:

World:setAllowSleeping -> setSleepingAllowed
World:getAllowSleeping -> isSleepingAllowed

Joint:getCollideConnected also returns a single boolean... I'm not sure what it should be named though.

For setter/getter symmetry and API consistency (via not starting a method with "enable"):

Prismatic/RevoluteJoint:enableLimit -> setLimitsEnabled
RevoluteJoint:isLimitsEnabled -> hasLimitsEnabled
PrismaticJoint:isLimitEnabled -> hasLimitsEnabled
Prismatic/RevoluteJoint:enableMotor -> setMotorEnabled

Is there are reason why Shape:computeAABB and computeMass aren't named getAABB and getMass? Perhaps it's good that it communicates that it doesn't simply return state, but does a computation based on the state and information given as arguments, but it seems inconsistent with Font:getWidth and Font:getWrap, which seem analogous. Edit: I'm not necessarily suggesting these get* names, just thinking out loud, hehe.

Comments (4)

  1. Log in to comment