Update exercises/concept/lasagna/.docs/introduction.md

I’d like to suggest a small update to packages section for clarity.

The section on packages discusses camelCase vs PascalCase before setting the package name. This seems more relevant after the package name has been established. It made me think “wait, how is camelCase vs PascalCase relevant to the package name?” and could be confusing to others. I think having the discussion of what is exported from the package until after the package name is set would be better.

Thanks for all you guys do, and Happy New Year,

ps: this was Update exercises/concept/lasagna/.docs/introduction.md by cjon256 · Pull Request #2846 · exercism/go · GitHub if that makes it easier to merge? It should at least resolve any ambiguity in my suggestion.

Cullen

1 Like

Agree. In fact, I would add a new paragraph explaining the package naming conventions just before the package name is established.

It could be something like this (taken from Effective Go):

By convention, packages are given lower case, single-word names; there should be no need for underscores or mixedCaps. Err on the side of brevity, since everyone using your package will be typing that name.

I would say “err on the side of clarity” rather than brevity. In today’s coding environment, how often do people actually type out fully the names of things that can be auto-completed?

Clarity is much more important than brevity, in terms of names in code. We are already writing “code” and there is no need to make things “more cryptic”.

1 Like