1. 5
  1. 7

    C++, a language that includes not one, but three pure functional languages (preprocessor, templates, cosntexpr) and which uses two extensively throughout the standard library does ‘not encourage functional programming’? I think we might be using different languages.

    1. 3

      idk much about constexpr, but I try to use the preprocessor and templates as little as humanly possible in my C++ code. :-P

      1. 6

        I’d agree on the preprocessor but if you’re avoiding templates in C++ then you’re missing out on almost all of the power of the language. The absolute worst and most unmaintainable C++ code that I’ve read has been by people who avoid templates. Of course, the second worst is by people who over-use templates…

      2. 2

        You can redefine variables in the preprocessor, order matters,…

        I think that I wouldn’t qualify it as “purely functional”

      3. 1

        Note that this was originally published in April 2012.