методы set / get в C ++

Java-программисты и API, кажется, предпочитают явные методы set / get.

, однако у меня сложилось впечатление, что сообщество C ++ не одобряет такую ​​практику). If it is so,is there a particular reason (besides more lines of code) why this is so?

on the other hand, why does Java community choose to use methods rather than direct access?

Thank you

11
задан Anycorn 3 September 2010 в 01:46
поделиться