new way classes

I was told this isnt the most effecient way to create classes now
with lua, so what is a better way?

Is this the official way to do classes in corona now
http://blog.anscamobile.com/2011/09/a-better-approach-to-external-modules/

[lua]----main
local loadplayer = require( “player” )
local player = loadplayer.player:new(1);
player:loadimages(70,350);
playerIMG=player:getPlayer();

----player
module(…, package.seeall)

player = {}

player.__index = player

function player:new(i)
local o = {};
i = i;
setmetatable(o,self)
return o;
end
function player:loadimages(x,y)

…[/lua] [import]uid: 138547 topic_id: 25995 reply_id: 325995[/import]

sorry to bump this up but I still cant find the answer to this.

To use OOP in Corona what methods is most efficient ? There are many ways to do OOP in Corona but which one is optimal? [import]uid: 138547 topic_id: 25995 reply_id: 105618[/import]

That blog post is the recommended way, it means you can eliminate the use of module()

Peach :slight_smile: [import]uid: 52491 topic_id: 25995 reply_id: 105619[/import]

yes I believe you but the blog post doesnt say what I do with self variables and private variables, class variables.
So what do I do here about variables? [import]uid: 138547 topic_id: 25995 reply_id: 105656[/import]