Похожие чаты

So I've noticed this for a while now: in most

Class definitions I see out there, the public member-data and functions(though they most likely depend on private ones) are declared/defined before the private ones. I know the order has no effect, but is this like a standard convention? If yes, please what is the reason behind it

5 ответов

7 просмотров

When you're using a class you're interested in public members only. When they are on the top they are easier to find.

🖖- Автор вопроса

Ensure all public entity (written top) can be accessed by lower access method (protected & private). Order do has effect.

John
Ensure all public entity (written top) can be acce...

It doesn't matter where method are defined. As along as they are used after definitions. And it's more likely that private methods and members are used by public ones. Not the other way around.

Похожие вопросы

Обсуждают сегодня

Вопрос по диагностике ошибок (я знаю в чем, в данном конкретном примере, я знаю, как исправить, пример модельный, понятно, что в реальности бывает намного запутаннее). module...
ⰄⰎⰋⰐⰐⰑⰛⰤⰧⰧⰩⰄ ⰊⰑⰁⰓⰡⰛⰦⰕⰫ
10
Тут кста кто-нибудь NeoVim использует?
Simple Sorcerer
13
А чем вам питонисты не угодили?😂
.
79
Есть какой-нибудь для Delphi/FPC T*Compression(Decompression)Stream на базе LZ4/Zstd/любой другой быстрый(и хорошо сжимающий) алгоритм А ещё лучше в pure pascal А ещё лучше од...
notme
52
New Hedera drama. Is Hashinals on chain or not on chain?
Perfect Ability
16
Can someone explain me the difference of the stated quote on Quants homepage between R3 and Quant? „R3 brings its ability to deliver complex pioneering projects for regulate...
Carlson
2
Asus, норм фирма для ноутов?
Артем Записной
20
guys, why is it taking days for my node to sync? is this normal?
Big Chiano
10
А дальше что?.. Записать в файл, потом в Код?.. И потом разбирать как-то?..
Хаскель Моисеевич Гопник
14
Ребят немного глупый вопрос, но я правильно понимаю что неполнота по геделю означает наличие парадокса?
Smith
9
Карта сайта