fullstack-development / fullstack-development/front-end-best-practices

Нейминг приватных полей класса

Open
#31 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
336
Forks
76
PR merge metrics
No merged PRs in 30d

Description

Привет всем!
В goodPractice.md имеется пункт про следованию стайлгайду от AirBnB. И хотя там же присутствует оговорка

Все, что перечислено в гайде принять к исполнению, если это не перекрыто нашими правилами ниже

тем не менее, хотелось бы акцентировать внимание на спорных рекомендациях касательно нейминга (квази)приватных методов класса:

В js нет публичных и частных свойств, поэтому частные методы просто делать с префиксами "_" (нижнее подчеркивание)

Как вы считаете, возможно, стоит этот пункт переписать с учетом правил, изложенных в стайлгайде AirBnB, и использовать для имитации приватных полей WeakMap или, как вариант, символы?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read JS/goodPractice.md and JS/architecture.md, then compare the cited Airbnb naming guidance. This is an open design question rather than a specified edit; it is done when the project’s preferred guidance for pseudo-private class methods or fields is agreed and documented in the relevant section.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.