3 ms·
> Yeah, we get it that functional languages came first, but rather than looking down on C++ why not celebrate that functional constructs are making it into plac
by jlarocco 11y ago
> Yeah, we get it that functional languages came first, but rather than looking down on C++ why not celebrate that functional constructs are making it into places where they haven't been before.
Because that's a meaningless thing to celebrate? Having functional concepts available in a poorly integrated way, with super ugly syntax is more depressing than anything, because seeing it in use is a reminder of how much cleaner it would be in a language like Haskell or OCaml.
Why not accept that C++ isn't a functional language, and realize that many die-hard C++ users won't use these features for the same reasons they're not already using functional languages.
I'd rather see these efforts directed towards improving the compilers and libraries for languages like Haskell, OCaml, etc.
- dragonwriter 11y ago> Having functional concepts available in a poorly integrated way, with super ugly syntax is more depressing than anything, because seeing it in use is a reminder of how much cleaner it would be in a language like Haskell or OCaml. I swear I remember fans of older OO languages saying the almost exactly the same thing with "object oriented" in place of "functional" about the way C++ grafted OO concepts onto C when C++ was new -- and, IMO, with good justification. Still, C++ was not exactly unsuccessful with that, either.
- CyberDildonics 11y agoI guess that's why so much of the software you use every day is written in Haskell and OCaml.
- quizotic 11y ago> Why not accept that C++ isn't a functional language, and realize that many die-hard C++ users won't use these features I'm a die-hard C++ user, and have come to love functional programming for a very C++y reason: improved performance that comes from lock-free parallelizability (if you never modify values, you don't have to synchronize access). But I also love the simplicity that comes from not having to think so deeply about lifetimes and which portions of code can see which objects in which states. The abstraction of data-structure from algorithm is nice, the terseness is nice, the regularity is nice, but it's the lifetime and visibility simplification that helps me the most. I don't know Haskell or OCaml. I wouldn't know a monad if it slapped me in the face. But functional C++ makes me happy
- zem 11y agopony might make you happy too. here's a great presentation on it: https://cdn.rawgit.com/darach/my_little_pony/master/my-little-pony.html#/ https://cdn.rawgit.com/darach/my_little_pony/master/my-littl...