Wish private class methods

Discussion in 'Bugs & wishlist' started by MarkusR, Dec 3, 2018.

Tags:
  1. MarkusR

    MarkusR Well-Known Member Licensed User

    if u write a object name with a dot all public methods shown in a pop up.
    would be also nice if developers see private methods there too (maybe in grey or group by public,private)
    and if they click them it navigates to the source of the class.
    reason is that people missing her subs in the popup list if they declared it "private" in the class file by mistake.
     
  2. LucaMs

    LucaMs Expert Licensed User

    They should fix the bug, instead of expose private methods.

    -1
     
    jimmyF and Jeffrey Cameron like this.
  3. MarkusR

    MarkusR Well-Known Member Licensed User

    improve the usability is not wrong.
    believe me, u are 10x faster it u not stumble at things like this.
    it happens also that u need make a private sub into public.
     
  4. LucaMs

    LucaMs Expert Licensed User

    "Private" means... private :), and they should be always private. For the user public methods exist.
     
    Peter Simpson likes this.
  5. Erel

    Erel Administrator Staff Member Licensed User

    I agree with Luca. Private members shouldn't be exposed. The developer can easily find all subs by clicking on Ctrl + E and writing the sub name.
     
    Jmu5667, Sandman and klaus like this.
  6. MarkusR

    MarkusR Well-Known Member Licensed User

    but if the developer write name.a , its filtered by letter a, why not show this sub as private instead of nothing?
    sort by public then private. it not meant that its filled after dot after a click in this list.
    the issue was the developer did not now why its invisible there because he have not his class in front.
    and in his class he saw his sub and overlooked the "private" word.
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    1. It weakens the encapsulation feature which one of the most important programming concepts.

    2. It will make the developer experience more complex as the developer will see many methods that they are not expected to call.
     
    fredo, Peter Simpson and klaus like this.
  8. MarkusR

    MarkusR Well-Known Member Licensed User

    it can be optional and on by default for beginners. there is a lot of space on the screen. maybe right beside the pop up.

    how about a help/hint icon there, i think it will not bother?
    "if your Sub not appear here then its maybe declared private and not public in the class or module"
     
  9. LucaMs

    LucaMs Expert Licensed User

    If you allow the developers to access private methods, mistakes will increase for sure.
     
  10. LucaMs

    LucaMs Expert Licensed User

    If you really feel the need, you just need to create only public routines and give the private ones names with a prefix like "pvt".
     
    Last edited: Dec 4, 2018
  11. MarkusR

    MarkusR Well-Known Member Licensed User

    i think u misunderstood what i have in mind. u need to change the angle of vision :)
    i not need this.
    generally:
    i see a lot of problems /time killer that happens everyday at developing games or apps at all development environments.
    if a problem is solved it not happen again and again. if a problem occur it always waste time.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice