private slots

Scott Wheeler wheeler at kde.org
Sat Jan 6 10:19:45 GMT 2007


André Wöbbeking wrote:
> On Saturday 06 January 2007 10:44, Ellis Whitehead wrote:
>   
> Why do we use protected and private methods at all, lets make them all 
> public ;-)
>   

For all practical purposes they're just API documentation that's 
enforced by the compiler.  It's always been easy to work method 
permissions if you wanted to.

> Maybe a bad habit but very often I use the source code instead of the 
> docs so I would "find" the _k_* slot very fast.
>   

That's pretty irrelevant.  Ideally you're not trying to write broken 
applications and are smart enough to figure out that you're not supposed 
to call those functions.  ;-)

-Scott




More information about the kde-core-devel mailing list