Skip to content

Board format as 1-line string#1

Open
jasonmm wants to merge 4 commits into
gfarrell:masterfrom
jasonmm:board-format
Open

Board format as 1-line string#1
jasonmm wants to merge 4 commits into
gfarrell:masterfrom
jasonmm:board-format

Conversation

@jasonmm

@jasonmm jasonmm commented Jun 30, 2019

Copy link
Copy Markdown

I wanted the ability to represent the board as a 1-line string. Figured I would share it back if you find it useful.

jasonmm added 3 commits June 27, 2019 18:54
The new `boggle.utils/str->board` function converts a 1-line string
board into the multi-line format expected by `boggle.core/load-board`.

@gfarrell gfarrell left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hi @jasonmm, thanks for opening this PR! I just have a question about the use of use vs. require.

Comment thread src/boggle/core.clj
(:gen-class))
(:require [clojure.string :as string]
[clojure.java.io :as io]
[clojure.math.numeric-tower :refer [abs]])

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

May I ask what the reasoning is behind this change?

@jasonmm jasonmm Jul 19, 2019

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

My motivation for the change was mostly based on this section of the style guide (and this post). I think the motivation for preferring :require is because :use makes it easier to overwrite or shadow var names since it automatically refers them into the current namespace.

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.

2 participants