The general value of typed functional programming lies in leaving no edge cases
1–10 of 172 posts
Re: The general value of typed functional programming lies in leaving no edge cases
#2 for i=0 to 10 {print(a[i])} vs for x in a {print(x)}
With functional programming it gets even better:a.filter {}.map{print}
Pseudo code, of course. I list several “functional“ examples in Swift here:
https://github.com/melling/SwiftCookBook/blob/master/functio...
Functional programming is also a higher level language. map, reduce,filter, flatten, flapMap, drop, take, zip, ...
Learn the concepts in one language and they can be used in another functional language.
Re: The general value of typed functional programming lies in leaving no edge cases
#3I've seen this over and over in my career; tools can make people lazy in certain areas, it can put them on auto-pilot. Often, this can be a bad thing.
I like coding with dynamic languages because they get out of my way and shift the full responsibility for correctness on me. This creates a certain mental tension which helps me to perform. Keeps me alert and mindful.
I particularly try to avoid languages that make me wait for code to compile (which is more common with statically typed languages); this is for the same reason why don't like it when someone distracts me while I'm "in the zone" while coding.
Re: The general value of typed functional programming lies in leaving no edge cases
#4It's why I think it competes for market share with some of what is currently Java/C# and similar languages. A lot of people who use those languages care about correctness, and Rust is big step up in this regard.
Re: The general value of typed functional programming lies in leaving no edge cases
#5The goal of software development should be about reducing the number of edge cases to the absolute minimum. If a tool makes it easier to keep track of all edge cases, it is bound to encourage developers to write code which contains more edge cases. But fundamentally, it still reduces code quality. Code with more edge cases is less flexible and not good at handling changing requirements. I've seen this over and over i…
Re: The general value of typed functional programming lies in leaving no edge cases
#6The goal of software development should be about reducing the number of edge cases to the absolute minimum. If a tool makes it easier to keep track of all edge cases, it is bound to encourage developers to write code which contains more edge cases. But fundamentally, it still reduces code quality. Code with more edge cases is less flexible and not good at handling changing requirements. I've seen this over and over i…
Re: The general value of typed functional programming lies in leaving no edge cases
#7The goal of software development should be about reducing the number of edge cases to the absolute minimum. If a tool makes it easier to keep track of all edge cases, it is bound to encourage developers to write code which contains more edge cases. But fundamentally, it still reduces code quality. Code with more edge cases is less flexible and not good at handling changing requirements. I've seen this over and over i…
But between these two exist a permutation of conditions that exists in the domain and often manifest in production. Either we can actively manage them thanks to types, or we can let it end up in production with hard-to-track bugs.
Re: The general value of typed functional programming lies in leaving no edge cases
#8The goal of software development should be about reducing the number of edge cases to the absolute minimum. If a tool makes it easier to keep track of all edge cases, it is bound to encourage developers to write code which contains more edge cases. But fundamentally, it still reduces code quality. Code with more edge cases is less flexible and not good at handling changing requirements. I've seen this over and over i…
Re: The general value of typed functional programming lies in leaving no edge cases
#9The goal of software development should be about reducing the number of edge cases to the absolute minimum. If a tool makes it easier to keep track of all edge cases, it is bound to encourage developers to write code which contains more edge cases. But fundamentally, it still reduces code quality. Code with more edge cases is less flexible and not good at handling changing requirements. I've seen this over and over i…
Re: The general value of typed functional programming lies in leaving no edge cases
#10The goal of software development should be about reducing the number of edge cases to the absolute minimum. If a tool makes it easier to keep track of all edge cases, it is bound to encourage developers to write code which contains more edge cases. But fundamentally, it still reduces code quality. Code with more edge cases is less flexible and not good at handling changing requirements. I've seen this over and over i…
Isn't this akin to saying I don't like wearing seatbelts because it makes me more complacent in my driving?