Comment

Comment by Groxx

As one not knowledgeable about Clojure, and to play devil's advocate: one of the handy parts about `//` is that you can violate the language rules. E.g. I've fairly often had cases where I want to temporarily remove a check, to see if something behaves as I expect:

  //if (some logic) {
    do something
  //} else {
  //  something else
  //}
Or in other cases collapse two if/else blocks together, or stuff like that. It's not as common as commenting out a logical unit, definitely, but it's far from uncommon.

How would you achieve that in Clojure? Seems like you'd need to copy/paste, like this?

  #_(if (cond) thing other_thing)
  thing
parent Groxx 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton