Hacker News new | ask | show | jobs
by toolslive 651 days ago
in OCaml, the single quote is a valid char for an identifier:

    let f = ... and 
    let f' = ...
1 comments

I did not know that, and I question that choice as well. Why would you use that?

It's a little less bad, because you can just have your own style guide that says "Don't do that".

It's common math notation to have f and f prime to represent something derived from f.
As an OCaml beginner I've mostly seen it used for inner functions in lieu of calling the inner function `f_impl`.