News for hackers. Stuff that matters.
Re:Clojure is cool by james-mcelwain on Sunday September 09, 2018 @11:03AM (#17946209)
On the contrary, nil punning seems exceptionally well suited to a dynamic language. In general, I'm only burned by nil propagating into Java, almost all Clojure code seems to handle nil appropriately.

I'm unsure of a good way to represent optionality in a dynamic language without a static type system. Or rather, doing so with the tools available -- core.match vs real pattern matching -- seems rather un-ergonomic.

I'm curious about your thoughts of what would be better.

Re:Clojure is cool by squaredpants on Sunday September 09, 2018 @03:03PM (#17947236)
You are right regarding the dynamic language, well, dynamic. I haven't put any thought into it and I can't come up with a viable solution of eliminating nil without some type system strategy (Maybe/Either Monads in Haskell, Option in Rust, etc). It's kind of a bummer, because I love the Lisp dialect of Clojure, but really appreciate software projects that I've written in the past that don't crash due to a forgotten potential nil value handling.

You do have a point!

Re:Clojure is cool by gnl on Monday September 10, 2018 @06:05AM (#17950646)