For discussion: the term "lazy loading"
Nobody has claimed this yet.
- Dominant language
- Less
- Stars
- 680
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
The phrase "lazy loading" in Less's documentation has been bugging me. The Wikipedia entry for lazy loading says: "Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed."
In Less's documentation, we say: "Variables are lazy loaded and do not have to be declared before being used."
Variables that do not have to be declared before being used is not the same as lazy loading. Lazy loading would be a scenario in which the value is declared but not initialized until it is called. Meaning, if the variable were never referenced, it would never have a value.
I'm not trying to be nitpicky, but it sounds like we're using imperative language to explain a declarative behavior, just to have it make sense to people? However, since lazy loading is a common term in web development (often used for delaying retrieval of images until they're about to be displayed), it gets confusing that it doesn't quite match the same concept. My worry is that in an effort to simplify with a known term, we're actually being misleading and possibly confusing the behavior for people.
To me, it would seem what we want to say is that variables have one value per scope block, and that value can be referenced at any point in the same block. Which is sort of saying the same thing, but doesn't use a known term in a slightly incorrect way.
I believe the language this replaced was Alexis's original description that variables were "actually constants", which, unfortunately, was also not exactly true either. I'm just wondering if there's a clearer way to say this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the Less documentation passage quoted in the issue and compare its description of variable behavior with the cited lazy-loading definition. Done means reaching agreement on clearer terminology and updating the relevant documentation wording.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100