This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-27
Channels
- # admin-announcements (1)
- # aws-lambda (2)
- # beginners (48)
- # boot (231)
- # capetown (1)
- # cider (35)
- # cljs-dev (25)
- # cljsrn (74)
- # clojure (273)
- # clojure-austin (2)
- # clojure-berlin (5)
- # clojure-hk (1)
- # clojure-poland (1)
- # clojure-russia (50)
- # clojure-spec (63)
- # clojure-uk (58)
- # clojurescript (51)
- # cursive (5)
- # datomic (39)
- # defnpodcast (3)
- # dirac (13)
- # editors (6)
- # emacs (3)
- # hoplon (86)
- # jobs (2)
- # lein-figwheel (1)
- # liberator (3)
- # off-topic (10)
- # om (113)
- # onyx (34)
- # protorepl (29)
- # re-frame (2)
- # reagent (8)
- # remote-jobs (1)
- # ring (4)
- # test-check (42)
- # untangled (31)
- # yada (2)
poll: imports indentation 1️⃣
(ns my.app.core
(:require-macros
[one.two :as t]
[three.four :as f])
(:require
[one.two :as t]
[three.four :as f])
2️⃣
(ns my.app.core
(:require-macros [one.two :as t]
[three.four :as f])
(:require [one.two :as t]
[three.four :as f]))
Cast your vote !@misha: this is actually an interesting question.
As a newcomer to to clojure, I just don’t get vertical alignment. This creates a dependency between naming and indenting. When you change a name, you potentially need to reindent a fuck load of code. Can anyone explain?
@tomerweller: Paredit does a lot of stuff automatically and I just rerun indent-code command on the whole file if needed
(I’m using Emacs)
Fair argument but that’s tooling. Imagine you have a widely used function name in your codebase. Refactoring that name, no matter what tools you use, will mean reindenting all function calls. That git diff will be the ugliest ever, for no good reason. You changed one name and reindented hundreds/thousands l.o.c
That's an interesting point actually @tomerweller
Thanks 🙂 My personal preference is that whenever I have a multiple line expression, to have the first argument on it’s own line (like @misha ’s #1 example, which seems to be the less popular one)
@mihaelkonjevic automatically re-indenting half of a namespace is bad idea from the "git diff" point of view.