3 ms·
"OK, that's basically a static method in C#. Is that wrong?" A static method can have side effects and/or return different results even when given the same arg
by kgwxd 8y ago
"OK, that's basically a static method in C#. Is that wrong?"
A static method can have side effects and/or return different results even when given the same arguments. e.g. returning DateTime.Now would never yield the same results.
"So functional programming should never handle state?"
Any useful application will have state and side effects, the idea is to push as much of it as possible to the outer edges of your application and keep the core as pure as possible/practical. You can do that with any language, but a functional languages will be designed to make that easy and idiomatic.