News for hackers. Stuff that matters.
Re:A Year in Clojure by jb1991 on Sunday October 07, 2018 @06:38PM (#18162998)
I think I would definitely benefit from blog posts or whole books on Clojure style specifically, rather than the many constant re-introductions to its syntax and data structures (like the one in this article). Your thoughts have come closer to explaining a maintainable approach to the language than most of what is out there. In my experience, despite working for years professionally with Clojure, I've never successfully felt like I wasn't fighting the language because of the constant and unexpected nils and other odd wranglings of data that were not intended and not easy to track down at runtime. The flexibility of the dynamic typing and the many APIs for manipulating data can make it easy to restructure your values in unintended ways, and this to me is a meaningful problem unique to the language. I don't have the problem in a Java app, for example, of a Foo type accidentally becoming a Bar type or even some other "type" that was never defined but now has a unique data shape because I made a typo somewhere or used the wrong library function, etc.
Re:A Year in Clojure by Scarbutt on Sunday October 07, 2018 @08:09PM (#18163314)
Regarding nil, its considered bad practice to use it as values in maps.
Re:A Year in Clojure by hellofunk on Sunday October 07, 2018 @08:20PM (#18163347)
Right, which is why I said “unexpected nils”.