Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup fixes #216

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Setup fixes #216

wants to merge 3 commits into from

Conversation

14v
Copy link

@14v 14v commented Jan 11, 2020

No description provided.

else
# auth failed
zenity --warning --title="$_YD_auth_title" --text "$auth_output"
showAuthDialog
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А зачем повторый вызов авторизации через рекурсию делать? В цикле что-ли нельзя?

Copy link
Author

@14v 14v Jan 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В цикле - while $notAuthorized? Используя функцию не нужно заводить переменную, повторный вызов явно указывает на точку входа, не нужно проверять возможную вложнность циклов - функциональный вариант более читабельный.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Завести функцию и заваливать стек рекурсивными ее вызовами это конечно экономнее чем завести одну переменную для одного (не вложенного) простого цикла. :)

Извините, но я в душе максималист-оптимизатор и рекурсия вместо цикла - для мня - стрельба из пушки по воробьям.

Рекурсия бывает нужна - не спорю. Но не тут.

Где там нужна проверка вложенности каких циклов, и чем это вредит читабельности - мне тоже не понять...

ya-setup Outdated Show resolved Hide resolved
Copy link
Owner

@slytomcat slytomcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А переводы через что делали?

@14v
Copy link
Author

14v commented Jan 13, 2020

Через Google translate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants