News for hackers. Stuff that matters.
Re:Better Clojure formatting by vbuwivbiu on Friday December 07, 2018 @02:13AM (#18625712)
Jeez it's just data! Use a standard format for serialization and then use programs to format it for reading & everyone gets to read it the way they like it
Re:Better Clojure formatting by mrmaloke on Friday December 07, 2018 @04:12AM (#18626154)
That way you force a serialization standard upon everyone. I'd rather force a formatting standard upon everyone and get the benefit of readable code with any tool e.g. also code reviews in version control. There's hardly a way to read code "the way I like it" in a webapp.
Re:Better Clojure formatting by vbuwivbiu on Friday December 07, 2018 @05:01AM (#18626362)
that's exactly what I mean by standard serialization format - format of code exchanged between people and programs. You can always rely on the standard way (for example the one presented here) when reading code on github or when you open it in your text editor by default, and then if you have another way you prefer that it be formatted, you can use a program to format it that way for you while you work on it - however when you commit it, it's formatted the standard way not your special way.

We've conflated how the code is stored with how it looks. We need to separate these. That's one of the problems with equating code with text: they're different things. Code is data (or objects), text is a way to represent code.

Re:Better Clojure formatting by rogual on Friday December 07, 2018 @06:40AM (#18626848)
I don't know if they are totally separate. Say you like to see XMLHttpRequest and I like to see xml-http-request. If I type xml-http-request, how can a piece of software know how to translate that to XMLHttpRequest?

It's not just variable casing; it's any situation where one coding style distinguishes two things which look the same in another coding style. And I think there's a lot of such cases.

Re:Better Clojure formatting by vbuwivbiu on Friday December 07, 2018 @07:28AM (#18627079)
this is in the context of LISP code
Re:Better Clojure formatting by ludwigvan on Friday December 07, 2018 @07:09AM (#18626982)
That’s quite insightful actually. It had not occurred to me that way and for a simple example, I can envision a prettier based web extension that makes reading code bases online easier.