Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Clarifyns form rules #247

Open
Open
@camsaul

Description

@camsaul

There are a handful of things that aren't covered in the Namespace Declaration section, that are mentioned inStuart Sierra'sHow Tons style guide. It's probably good to have opinions on these things one way or another:

  • Should one use vectors or lists for:refer and:exclude, e.g.[clojure.string :refer [blank? capitalize ends-with?]] or[clojure.string :refer (blank? capitalize ends-with?)]? I think the "vectors" is a pretty uncontroversial here, but this is not mentioned in the style guide

  • Should we sort:excluded symbols, or does it not matter?How tons suggests sorting them. This style guide suggests sorting:refer, but says nothing about:exclude, and there's an unsorted examplehere.

  • Should bare namespaces without:refer/:as/etc. still be wrapped in square brackets?How tons says yes, because it makes visual scanning and sorting easier. This style guide doesn't say either way and there are no relevant examples here

  • Should prefix lists in:import be a vector or a list?How tons suggests a list. This style guide does not say anything about this, altho there are a few examples that use vectors.

  • How tons also suggestsalways using prefix lists forimports, even for just one class in that package. This style guide doesn't have an opinion either way -- it doesn't say for example "always use prefix lists forimports" or "do not use prefix lists when importing a single class from a package, but use them for multiple classes from a single package", but examples do seem to be following the latter rule.

It seems to me like the community is generally moving in the direction ofHow tons, and if I had a vote I would just say adopt the rest of the rules inHow Tons wholesale, but I'd rather see alternative rules than no rules at all. If any of these rules aren't things that you don't want to incorporate because of opposing opinions, maybe mentioning the different opinions would be better than leaving the rules out entirely?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp