Jacqueline Firth
Jacqueline Firth
Example: ```scheme (make-immutable-hash `((body . ,body) (event . ,event) (comments . ,(map github-review-comment-jsexpr comments)))) ``` If the keys are statically known, `hash` is simpler. The same goes for quasiquoted `#hash()`...
How should `resyntax` surface suggestions to users? I can think of several possibilities: - A DrRacket plugin that shows you suggestions for the current file. Maybe something similar for `racket-mode`,...
Many macros written in terms of `define-syntax` and `syntax-parse` can be simplified to use `define-syntax-parse-rule`. Resyntax should suggest rewriting these macros, as `define-syntax-parse-rule` macros have a lot less boilerplate and...
Saw [this code](https://github.com/jackfirth/yaragg/commit/9d48ab7152003e39aa6c1bab11a601d3723143fa#diff-dc70b3329cf8b1b6ea61529383803830acc294f93a8552442d7c669767060b81R118) today: ```scheme (λ () (define t (get-token-grammar i)) t) ``` The `t` variable is immediately returned and therefore useless. This can be refactored to just: `(λ ()...
This code: ```scheme (for ([x (in-range a (add1 b))]) body ...) ``` Can be refactored to this: ```scheme (for ([x (in-inclusive-range a b)]) body ...) ``` See this discussion with...
The expression `(sequence-tail (in-vector vec) i)` can be rewritten to `(in-vector vec i)`.
Saw this code today: ```scheme (display size) (display "\n") ``` That can just be `(displayln size)`. Catching this is tricky because it's kind of a splicing pattern, rather than a...
Saw this code today: ```scheme (define (range min max . step*) (define step (if (null? step*) 1 (car step*))) (define (range* lst min max) (define max* (- max step)) (if...
Suggested sort order: by phase, then by base module name, then by submodule / only-in clauses. Path-based module names should go after collection-based module names.