DreamBerd icon indicating copy to clipboard operation
DreamBerd copied to clipboard

Public and Private methods

Open cjfryer opened this issue 1 year ago • 2 comments

I have a hard requirement that I implement a private method on a Class. (It will, naturally, be a singleton)

I also have another hard requirement that the same method be public.

I don't want to overload the method.

Can we maybe have public private methods on Classes? Or private public? Whatever works for you.

cjfryer avatar Nov 30 '23 21:11 cjfryer

public method() => {}
private method() => {}

Hope that's helpful

5GameMaker avatar Dec 06 '23 07:12 5GameMaker

The above solution does not account for the limitation OP specified that overloading shouldn't be used. I propose a new keyword fitting this description. My suggestions for possible naming are:

  • priblic
  • publate

I would appreciate feedback!

thegatesdev avatar Dec 14 '23 14:12 thegatesdev