In favor of explicit argument
Shiro Kawai
(09 Aug 2020 01:33 UTC)
|
Re: In favor of explicit argument Lassi Kortela (09 Aug 2020 06:46 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(09 Aug 2020 09:27 UTC)
|
Re: In favor of explicit argument
Adam Nelson
(10 Aug 2020 22:25 UTC)
|
Re: In favor of explicit argument
Shiro Kawai
(10 Aug 2020 23:46 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(11 Aug 2020 07:58 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(11 Aug 2020 01:29 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(11 Aug 2020 07:17 UTC)
|
Re: In favor of explicit argument
Jim Rees
(11 Aug 2020 16:45 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(11 Aug 2020 16:57 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(12 Aug 2020 02:20 UTC)
|
Re: In favor of explicit argument
John Cowan
(12 Aug 2020 02:49 UTC)
|
Re: In favor of explicit argument
Arthur A. Gleckler
(12 Aug 2020 03:23 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(12 Aug 2020 13:29 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(12 Aug 2020 19:46 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(13 Aug 2020 00:40 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(13 Aug 2020 07:18 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(14 Aug 2020 01:24 UTC)
|
Re: In favor of explicit argument
Adam Nelson
(13 Aug 2020 01:13 UTC)
|
Re: In favor of explicit argument
John Cowan
(13 Aug 2020 01:53 UTC)
|
Re: In favor of explicit argument
Adam Nelson
(13 Aug 2020 03:09 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(13 Aug 2020 03:16 UTC)
|
Re: In favor of explicit argument
John Cowan
(13 Aug 2020 03:31 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(13 Aug 2020 08:04 UTC)
|
Re: In favor of explicit argument
Jim Rees
(13 Aug 2020 18:24 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(13 Aug 2020 20:05 UTC)
|
Re: In favor of explicit argument
John Cowan
(14 Aug 2020 02:41 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(14 Aug 2020 06:34 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(14 Aug 2020 13:30 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(14 Aug 2020 14:08 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(15 Aug 2020 22:56 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(16 Aug 2020 07:55 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(14 Aug 2020 02:29 UTC)
|
> In Clojure I use threading macros often, but one thing that always > bothers me is that the argument position is implicit (for most of the > family of macros). It is ok while working on it, but once I leave the > coding for a while and then look at the code, it's extremely confusing. +1 > I ended up always marking the inserted argument position with commas, > which are treated as whitespaces in Clojure. > > srfi-197 allows to use <> as the insertion points, and I can always use > it even the argument position is the last position: > > (chain (a b) (c d <>) (e f <>)) This is a nice notation. I've always found the <> marker a bit confusing since it stands for "not equal" in Pascal and many other languages. But it's inherited from SRFI 26 `cut` and `cute` which I guess set a strong precedent. Starting from scratch, I would prefer underscore which is a placeholder marker in many languages: (chain (a b) (c d _) (e f _)) > And I wonder if we gain anything by allowing <> in the last position to > be omitted. > > Sure it may shorten the code a bit. However, the spec is effectively > the same as "show the argument position with <> except when it's the > last position, in which case you can omit it." It looks somewhat an > arbitrary and irregular rule. +1 > Code is read far more times than written. Saving a few keystrokes > trading off readability doesn't seem a good deal. > > Is everyone comfortable with implicit argument? Certainly, when I see > (cons "x"), I can see there's an implicit argument, since the fact that > cons takes two arguments is engraved in my brain (the same circuit fires > when I'm reading Haskell code). > But it isn't always necessary the case, e.g. (list 'a 'b) Good point.