John Carmack on Functional Programming in C++ (2018)
sevangelatos.com
John Carmack on Functional Programming in C++ (2018)
1–10 of 179 posts
Re: John Carmack on Functional Programming in C++ (2018)
#2Re: John Carmack on Functional Programming in C++ (2018)
#3Looks left, looks right, quietly closes vscode and rm -rf's the dev folder
Re: John Carmack on Functional Programming in C++ (2018)
#4Re: John Carmack on Functional Programming in C++ (2018)
#5best article i've seen on pragmatic purity - i would only dissent on c++ not providing facilities for pure functions (i don't here mean pure in the virtual=0 sense) - you can, and should, do quite a lot.
Re: John Carmack on Functional Programming in C++ (2018)
#6This guy really really knows how to explain things succinctly and expressively.
https://github.com/ESWAT/john-carmack-plan-archive/tree/mast...
Re: John Carmack on Functional Programming in C++ (2018)
#7> but if you do this with typical C++ containers you will die. Looks left, looks right, quietly closes vscode and rm -rf's the dev folder
Re: John Carmack on Functional Programming in C++ (2018)
#8From what I can see in this article he mostly seemed to like the purity aspect of FP. It seems to me like a number of FP concepts aren’t really “FP things”, as Carmack points out you can use these patterns in imperative languages as well. Making your own DSL seems to also often be an FP thing that doesn’t need to be an FP thing.
I guess the other way is true as well. OCaml has OOP and support for imperative style (with mutation, early returns via exceptions, etc.)
Re: John Carmack on Functional Programming in C++ (2018)
#9Got no real data for it but I felt the quality of the code I wrote was much better going forward.
Re: John Carmack on Functional Programming in C++ (2018)
#10best article i've seen on pragmatic purity - i would only dissent on c++ not providing facilities for pure functions (i don't here mean pure in the virtual=0 sense) - you can, and should, do quite a lot.
The language does not offer the features that you were referring to, and that the author of the article mentions. You can write pure functions, but the purity is not checked by the compiler, that is what has been meant here.