3 ms·
> expressions are crucial in functional programming, where even an if-statement returns a value Yes, but in functional programming, expressions can't have side
by pdonis 6y ago
> expressions are crucial in functional programming, where even an if-statement returns a value
Yes, but in functional programming, expressions can't have side effects, so the problem that the article is discussing in that part doesn't even exist.
- Jtsummers 6y agoYes they can have side effects. It's Haskell and other "pure functional" languages that reduce or eliminate side effects.
- pdonis 6y ago> Yes they can have side effects. I'm not saying expressions can't have side effects in particular languages. I'm saying that, by definition, "functional programming" means that expressions can't have side effects; which means that if you are doing "functional programming", then even if the language you are programming in allows expressions to have side effects, you are not making use of that feature, but are writing your expressions to make sure they don't have side effects, since that is what functional programming requires.
- deleted 6y ago[deleted]