3 ms·
Not sure if this was your intention or not, but to me that proves the usefulness of the walrus operator: the first snippet in the parent comment seems far clear
by quietbritishjim 4y ago
Not sure if this was your intention or not, but to me that proves the usefulness of the walrus operator: the first snippet in the parent comment seems far clearer to me, even though I'm fairly familiar with the functional operators.
- weird-eye-issue 4y agoIt's a very useful pattern once you know what it does, sort of like the walrus operator
- quietbritishjim 4y agoI was careful to pre-empt this exact response in my original comment: I do know what it does. The fact remains that it's less readable (IMO) because of the density of line noise and the lack of common structural elements (like if and for - I suppose filter and map fulfill this but their parameter separate out elements that ought to be next to each other). I do think that my preference, however slight, would remain no matter how much time I spent with the functional versions.
- weird-eye-issue 4y agoI'm glad you know what it does but you weren't born knowing what the walrus operator does either