February 05, 2018 Re: Inline code in the docs - the correct way OT: lisp | ||||
---|---|---|---|---|
| ||||
Posted in reply to Patrick Schluter | On Mon, Feb 05, 2018 at 06:38:22PM +0000, Patrick Schluter via Digitalmars-d wrote: [...] > When I programmed AutoLISP extension in AutoCAD I would use parentheses in the exact same way as I use { } in C. So not at the end of a line but vertically at the level of indentation; > > (defun xy > (car > (cdr > (cons a b) > ) > ) > ) > > This made it much better to handle. That's also my personal preference. Unfortunately, such practice is frowned upon by some Scheme communities. Why, is absolutely beyond me. :-D T -- LINUX = Lousy Interface for Nefarious Unix Xenophobes. |
February 06, 2018 Re: Inline code in the docs - the correct way | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On 05.02.2018 16:27, H. S. Teoh wrote: > > Apparently it's a prevailing style for Lisp and Lisp dialects like > Scheme. Random example (this is in Guile, a Scheme dialect, quoted from > open source code): > > (define (match-predicate obj alist) > (if (null? alist) > "Unknown type" > (if (apply (caar alist) obj) > (cdar alist) > (match-predicate obj (cdr alist))))) > > The only way I can keep my sanity while editing this sort of code is > vim's jump-to-match feature. I additionally use: https://www.emacswiki.org/emacs/RainbowDelimiters |
Copyright © 1999-2021 by the D Language Foundation