How to create a private / local function in Object Oriented Programming?

Using import "CoreLibs/object" what is the idiomatic (preferred) way of creating a function for a class that does have a reference to self, but is not accessible from outside the file where the class is defined?
In other words: how do I create a private function. The example below works, but I'm not sure whether there is a better way, where I don't have to pass self explicitly as a parameter:


local function renderShards(self)

local function renderExplosion(self)

function GameExplosion:render()

I think this is it. Anything added to the class object (table) will be accessible externally I believe.

Considering no more replies so far and this StackOverflow post not mentioning alternatives, I guess you're right :slight_smile:

indeed it is, there is no concept of access control levels in objects for lua!