Ramin Honary on Nostr: Yet another rant about Python and JavaScript: I hate it when someone tells me, "well ...
Yet another rant about Python and JavaScript:
I hate it when someone tells me, "well Python and JavaScript can be programmed in functional programming style, so they are just as good as any other functional programming language."
Then for the 100th time my program crashes and I spend 20 minutes debugging only to find that I wrote a function like this:
def getThing(self):
self.thing
instead of like this:
def getThing(self):
return self.thing
...where basically the problem is most of my program is written in functional programming style, except you STILL have to write the fucking "return" statement as the last line of the function.
If your language has "return" as a built-in control flow, it is hopelessly imperative not functional, and there is not a single monad framework or higher-order-function library anywhere that will make your language functional. Stop telling me imperative languages are just as good as functional languages.
I hate it when someone tells me, "well Python and JavaScript can be programmed in functional programming style, so they are just as good as any other functional programming language."
Then for the 100th time my program crashes and I spend 20 minutes debugging only to find that I wrote a function like this:
def getThing(self):
self.thing
instead of like this:
def getThing(self):
return self.thing
...where basically the problem is most of my program is written in functional programming style, except you STILL have to write the fucking "return" statement as the last line of the function.
If your language has "return" as a built-in control flow, it is hopelessly imperative not functional, and there is not a single monad framework or higher-order-function library anywhere that will make your language functional. Stop telling me imperative languages are just as good as functional languages.