by pixie_ · 11y ago · 0 comments
Enumerable.Range(1, 10).Select(i => i + 2).Sum()
As a person who doesn't even know what language this is written in, I don't think it is readable at all. For example, this "Select(i => i + 2)" piece looks totally strange for me. What does it do?
After learned Lisp, I feel there's too much syntax to learn for non-lisp languages. Every language introduces some idiosyncratic syntax. Life is too short, I just don't want to learn syntax that someone else invented to just be able to say "this is different".
(->>
(range 10)
(map #(+ % 2))
(reduce +))
Which is just as readable as the .net equivalent.