public and private, when would you use which

BlitzMax Forums/BlitzMax Beginners Area/public and private, when would you use which

When coding something that is to be a module, would it be advisable to do something like the following:

Private
Type zsLayer
Field texture:zsResource
Field zorder
Field visible

Method setVisible( VISIBLE )
self.visible = VISIBLE
End Method
End Type
Public

Function zsLayerVisible( visible )
zsLayer.setVisible( visible )
End Function


If I understand it correctly, that would let the user see the zsLayerVisble function but not the type and its methods. It would probably make it easier for the casual programer to use rather than having to figure out all the fields and understanding how they relate.

I wouldn't mind hearing others viewpoint on this.