-
Notifications
You must be signed in to change notification settings - Fork 0
Comments
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
старайся избегать использования статических функций, так как они не очищаются и всегда занимают место в памяти
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Понял. Но вроде в курсе ещё не встречал эту информацию)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не сокращай имена переменных и не используй аббревиатуры, к коду приходится возвращаться время от времени и бывает сложно понять, что значит то или иное сокращение через месяц или два
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
для ситуаций когда 2 и более условия, почти всегда лучше использовать switch/case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
с одной стороны, когда ты используешь более конкретный класc ошибки, то ты как бы делаешь свой код более точным, но с другой стороны, если произойдет любая другая ошибка, то твой код упадет и всё сломается, поэтому если на это нет острой необходимости, то проще использовать просто класс Exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вот тут я просто глядел форумы. Искал ответ, как лучше будет. Поэтому решил оставить так. Но я вас понял. Спасибо.
Проектная работа No1. Консольное приложение.