Skip to content

Board format as 1-line string #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jasonmm
Copy link

@jasonmm jasonmm commented Jun 30, 2019

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`.
Copy link
Owner

@gfarrell gfarrell left a comment

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.

(:gen-class))
(:require [clojure.string :as string]
[clojure.java.io :as io]
[clojure.math.numeric-tower :refer [abs]])
Copy link
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?

Copy link
Author

@jasonmm jasonmm Jul 19, 2019

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