Re:The general value of typed functional programming lies in...
by Naac on Monday February 24, 2020 @12:50PM
(#22406370)
What's specifically functional about this advantage. Can't you encode the buisness logic into types in non-functional languages as well?
[ Parent
| on HN ]
Re:The general value of typed functional programming lies in...
by hellofunk on Monday February 24, 2020 @01:04PM
(#22406506)
The word “type“ has a fairly different meaning in functional programming compared to object oriented programming. At a very shallow level, they have some similarities. But the way they are used is vastly different between the two paradigms.
Re:The general value of typed functional programming lies in...
by eru on Monday February 24, 2020 @12:54PM
(#22406425)
The type systems that are common in functional languages are usually more flexible and useful than what you find in most other common languages (in particular, usually more useful than the type systems of common object oriented languages).
Re:The general value of typed functional programming lies in...
by ativzzz on Monday February 24, 2020 @01:58PM
(#22407157)
You can encode it, but it is not enforced. For instance, I can refer to every instance/argument when I use a Person object as `person` or whatever name of the class is, but when you have many developers working on a large system, these things tend to slowly spiral unless you establish strict guidelines early on and enforce through code reviews.
Or you can use types where it's enforced by the compiler.
Re:The general value of typed functional programming lies in...
by marcosdumay on Monday February 24, 2020 @04:48PM
(#22408812)
On practice, no you can't. At least today.
But it may be a very interesting question for a researcher.