2 ms·
I feel like this doesn't make sense because mainstream functional languages all provide a way to express imperative code. In Haskell you can write an entire ap
by initplus 4y ago
I feel like this doesn't make sense because mainstream functional languages all provide a way to express imperative code.
In Haskell you can write an entire application using IO/do blocks and it will be completely imperative. In f# you can declare every variable mut.
Functional languages don't prevent you from writing imperative code. They give you the opportunity to choose not to, and enforce it at compile time. The opposite is not true of imperative languages, there the type system cannot help you to enforce that some code is purely functional.