Comments by "Anony Mousse" (@anon_y_mousse) on "" video.
-
1
-
1
-
1
-
I agree with most of this, but I would counter that I think functional programming is just a bad paradigm. The thing that makes computers usable is mutability, and most FP's push the idea that nothing should be mutable, that state should be concatenative. This leads to awkward solutions that are slower, or more memory consuming, than their procedural and OO counterparts. The other thing that FP's push is recursive algorithms, which if the compiler doesn't optimize correctly, or you write the code poorly and prevent it from optimizing correctly, will lead to problems like stack overflows. Some algorithms are easier to write recursively, but still perform better when done iteratively, and if you develop the skill of converting a recursive algorithm into an iterative one, you'll be better off for it, as will your code.
As for the issue of writing multiple linked list implementations for one project, I would argue that because of templates that's basically what ends up happening with modern code, except that it's the compiler writing those multiple implementations instead of you. While I've written and used libraries of data structures that conceptualizes everything as a void pointer and uses one set of functions to do everything, I think the modern technique is more efficient speed-wise, if not space-wise. In case anyone thinks I'm arguing for the old technique. Not that anyone will read this anyhow, because YouTube keeps filtering my posts.
1
-
@InforSpirit With regards to games, the best methodology to handling mutable state is to use an arena allocator to handle frame-wise data manipulations, which merely gets reset between frames rather than allocated and deallocated, and then have a higher order scope to handle persistent mutable variables. If we're talking about C++, then you'd have a game class which holds the persistent mutable state, and everything would run within its scope. I will agree that pure OOP languages, like C# and Java are terrible, but disagree that they're worse than pure FP languages. With non-FP languages, it's far easier to write performant code by accident, while it takes expert care to get an FP language to be performant when dealing with complex problems.
Though, what you're saying about validation doesn't make any sense. If you have to constantly validate your calculations, then you've chosen the wrong algorithm. In general, you don't need fine-grained validation of every single step in a calculation. Merely knowing the result is wrong is enough.
1
-
1