3 ms·
Yes. Source code reformatting has been around since `indent`, and probably before. The problem was getting everyone to agree on a style and use it consistentl
by nostrademons 12y ago
Yes. Source code reformatting has been around since `indent`, and probably before. The problem was getting everyone to agree on a style and use it consistently. Go solved that by providing an official style, and official tool, and a culture that consistently uses that tool. The only other language that's managed that was Lisp (via emacs), which for a variety of other reasons never became popular. Many others (eg. Java, C, Python, etc.) may provide the tool and/or the styleguide, but not the culture that consistently applies it.
In other words, it's a cultural innovation, not a technical one.
- lispm 12y agoFormatting and indenting are slightly different things. Formatting in Lisp is either called pretty printing or grinding. Formatting includes the layout of code including where the line breaks are in code. CL-USER 50 > (PPRINT '(DEFUN FOO (A B C) (* (+ A B C) (+ (EXPT A 2) (EXPT B 2) (EXPT C 2 )) (+ (EXPT A 3) (EXPT B 3) (EXPT C 3))))) (DEFUN FOO (A B C) (* (+ A B C) (+ (EXPT A 2) (EXPT B 2) (EXPT C 2)) (+ (EXPT A 3) (EXPT B 3) (EXPT C 3))))
- lispm 12y agoFormatting and indenting are slightly different things. Formatting in Lisp is either called pretty printing or grinding (in the editor). Formatting includes the layout of code including where the line breaks are in code. CL-USER 50 > (PPRINT '(DEFUN FOO (A B C) (* (+ A B C) (+ (EXPT A 2) (EXPT B 2) (EXPT C 2 )) (+ (EXPT A 3) (EXPT B 3) (EXPT C 3))))) (DEFUN FOO (A B C) (* (+ A B C) (+ (EXPT A 2) (EXPT B 2) (EXPT C 2)) (+ (EXPT A 3) (EXPT B 3) (EXPT C 3))))