Functional programming rah! OOP nah! Or how to know you're a zealot
-
Anyone who believes that OOP is good is delusional! If OOP were good we wouldn't need patterns, so the existence of patterns means OOP bad! FP is God and solves all problems! Use Lisp!
I mean, OOP isn't perfect. Sure. Some problem domains are best expressed in one, another, or multiple paradigms. But the author is a nut and the reason people often think functional programming is cult-adjacent.
-
As shown at the end, it's an ad for his own programming language that's part of his database wrapping project. Said language is proud to look like YAML and use self-modifying datacode (because code is data and vice versa) instead of functions. Or something.
-
@Parody said in Functional programming rah! OOP nah! Or how to know you're a zealot:
use self-modifying datacode (because code is data and vice versa) instead of functions. Or something.
-
@HardwareGeek said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Parody said in Functional programming rah! OOP nah! Or how to know you're a zealot:
use self-modifying datacode (because code is data and vice versa) instead of functions. Or something.
I think you meant to say
-
@Parody said in Functional programming rah! OOP nah! Or how to know you're a zealot:
because code is data and vice versa
That's why DEP (data execution prevention) was introduced long ago.
Oh wait, that works actually against that...
-
In fact, you can quantify a programming language's amount of "psychosis" according to its required number of design patterns in order to correctly use the language.
I would rather posit that the number of "patterns" and "rules of
thdumb" are directly related to the portion of idiots in the ranks that actually work with said language. Anything in software development goes to shit when the idiots start jumping on the bandwagon, if it wasn't already shit to start with.
If you have good developers, you can probably have them build great software on top of brainfuck.
And the reverse is also true. If you have bad developers, they can build brainfucks on top of great technologies.
-
@Carnage said in Functional programming rah! OOP nah! Or how to know you're a zealot:
If you have good developers, you can probably have them build great software on top of brainfuck.
-
@Carnage said in Functional programming rah! OOP nah! Or how to know you're a zealot:
If you have good developers, you can probably have them
build great software on top of brainfuck.
-
ask yourself the following; "What would Ronald Reagan and Nancy Reagan do?"
-
@Carnage said in Functional programming rah! OOP nah! Or how to know you're a zealot:
In fact, you can quantify a programming language's amount of "psychosis" according to its required number of design patterns in order to correctly use the language.
I would rather posit that the number of "patterns" and "rules of
thdumb" are directly related to the portion of idiots in the ranks that actually work with said language. Anything in software development goes to shit when the idiots start jumping on the bandwagon, if it wasn't already shit to start with.
If you have good developers, you can probably have them build great software on top of brainfuck.
And the reverse is also true. If you have bad developers, they can build brainfucks on top of great technologies.Eh...when you start doing more complicated things you tend to need more complicated code.
TFA strikes me as a related brainworm to Blakey's rants about how we just need better tools and then any idiot could program stuff. His golden hammer is FP, not Blakey's magic IDE + hypercard.
-
@dkf said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Carnage said in Functional programming rah! OOP nah! Or how to know you're a zealot:
If you have good developers, you can probably have them build great software on top of brainfuck.
Clearly if they were forced to write software on top of brainfuck, they'd start by writing a compiler to target brainfuck so they could use some other language instead.
-
@Watson said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@dkf said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Carnage said in Functional programming rah! OOP nah! Or how to know you're a zealot:
If you have good developers, you can probably have them build great software on top of brainfuck.
Clearly if they were forced to write software on top of brainfuck, they'd start by writing a compiler to target brainfuck so they could use some other language instead.
The biggest problem is the lack of system calls and/or support for memory mapped devices. Without that, the operations you can do are extremely limited.
-
@dkf There is an equivalent version of brainfuck which allows for 2 data tapes. You could point one of them at your memory-mapped IO space.
-
@boomzilla said in Functional programming rah! OOP nah! Or how to know you're a zealot:
TFA strikes me as a related brainworm to Blakey's rants about how we just need better tools and then any idiot could program stuff. His golden hammer is FP, not Blakey's magic IDE + hypercard.
If we didn't let every idiot program stuff, we'd have a better chance at adopting FP.
-
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
If we didn't let every idiot program stuff, we'd have a better chance at adopting FP.
If we only let a few very smart people write programs, we'll be able to adopt any fancy programming methodology we like.
-
@dkf said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
If we didn't let every idiot program stuff, we'd have a better chance at adopting FP.
If we only let a few very smart people write programs, we'll be able to adopt any fancy programming methodology we like.
And we'll have less time/resources available to
breakupdate everything 5 times a day.
-
@topspin the number of stupid problems is still increasing, unfortunately. The trouble of explaining them all to the very smart programmers is going to be, oddly enough, on the order of programming them directly...
I wasn't apprehensive about opening this thread. Nope not me. Not my HOF libraries.
-
I didn't read the article, but IMHO, the reason functional programming hasn't become more popular is because it doesn't fit the way most people think about problems.
-
@slapout1 are you saying that the tool choice is a function of the approach?
-
@slapout1 said in Functional programming rah! OOP nah! Or how to know you're a zealot:
it doesn't fit the way most people think[citation needed] about problems.
-
@slapout1 said in Functional programming rah! OOP nah! Or how to know you're a zealot:
most people think
-
@slapout1 said in Functional programming rah! OOP nah! Or how to know you're a zealot:
I didn't read the article, but IMHO, the reason functional programming hasn't become more popular is because it doesn't fit the way most people think about problems.
That and the scala and Haskell crowds are insufferable twats that drive off most newbies.
I tried reading a scala and the writer was such a terrible java developer I gave up.
-
@slapout1 said in Functional programming rah! OOP nah! Or how to know you're a zealot:
I didn't read the article, but IMHO, the reason functional programming hasn't become more popular is because it doesn't fit the way most people think about problems.
This is my old "blackboard versus kitchen" thesis. Programming has traditionally been understood as essentially a recipe: take the ingredients, mix and modify according to these steps, and you will produce this result. FP instead prefers to treat a program as a math problem to be solved on a blackboard, and anything that doesn't fit convenient mathematical abstractions (state, IO, etc) gets papered over with inconvenient mathematical abstractions.
When presented with this mess, a normal programmer's natural response is "what in the world is this blackboard doing in my kitchen?!?"
-
@Mason_Wheeler for values of “programmers” == “cheap hacks” and “mathematicians” == “computer scientists”, yes.
At least the latter try to do things like actually modeling a problem and coming up with correct solutions, instead of doing whatever sticks to the wall.
They’re probably also better at actually formalizing what “state” means. Type safety, race-free parallelism, etc.? Not something that originated from the “don’t put math in my programs ” crowd.The real problem, as mentioned above, is the people who can’t explain how things work without invoking the endofunctor cricket rule.
-
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Mason_Wheeler for values of “programmers” == “cheap hacks” and “mathematicians” == “computer scientists”, yes.
At least the latter try to do things like actually modeling a problem and coming up with correct solutions, instead of doing whatever sticks to the wall.
They’re probably also better at actually formalizing what “state” means. Type safety, race-free parallelism, etc.? Not something that originated from the “don’t put math in my programs ” crowd.The real problem, as mentioned above, is the people who can’t explain how things work without invoking the endofunctor cricket rule.
For "programmers" = "people who actually solve real problems" and "mathematicians" = "people who prefer to solve abstract, theoretical problems." The latter category is notorious for their inability to relate well to real concerns, and the FP tradition is a shining example of this problem.
-
@Mason_Wheeler Has a mathematician ever been observed in the real world?
-
@HardwareGeek They are simultaneously both in the real world and not in the real world until you open the box and observe their state definitively. But they really don't like the concept of state, so...
-
@Mason_Wheeler said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Mason_Wheeler for values of “programmers” == “cheap hacks” and “mathematicians” == “computer scientists”, yes.
At least the latter try to do things like actually modeling a problem and coming up with correct solutions, instead of doing whatever sticks to the wall.
They’re probably also better at actually formalizing what “state” means. Type safety, race-free parallelism, etc.? Not something that originated from the “don’t put math in my programs ” crowd.The real problem, as mentioned above, is the people who can’t explain how things work without invoking the endofunctor cricket rule.
For "programmers" = "people who actually solve real problems" and "mathematicians" = "people who prefer to solve abstract, theoretical problems." The latter category is notorious for their inability to relate well to real concerns, and the FP tradition is a shining example of this problem.
Yes, so a pile of shit covered with straw, as usual.
-
@Mason_Wheeler said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@HardwareGeek They are simultaneously both in the real world and not in the real world until you open the box and observe their state definitively. But they really don't like the concept of state, so...
It reminds me of nothing more than String Theorists.
- Plays with his math in public? Check
- Handwaves all the real hard parts like "how does this relate to the real world" or "what happens in 3 dimensions?" or "what happens if you have to do I/O?" Check.
- Generally a giant waste of money and time? Check
-
@Benjamin-Hall said in Functional programming rah! OOP nah! Or how to know you're a zealot:
- Generally a giant waste of money and time? Check
*cough* “billion dollar mistake” was an understatement after the cheap hacks showed up *cough*
-
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Benjamin-Hall said in Functional programming rah! OOP nah! Or how to know you're a zealot:
- Generally a giant waste of money and time? Check
*cough* “billion dollar mistake” was an understatement after the cheap hacks showed up *cough*
To be slightly less , FP ideas make a decent amount of sense, taken in proper proportion. Sure, most data manipulation functions should be pure; immutable data structures make a decent amount of sense for things being passed around. FP ideology (which verges on cult-like), like any other computer science ideology, does not.
I'm very strongly against programming dogmas. Null makes sense some times (although it's best if it's explicit via some sort of Optional type). Writing tests is good; drinking the TDD coolaid is not (usually). DDD works for things it works for, but shouldn't be taken as a religion. Some things work best more OOP, others better as more FP, yet others work purely procedurally. And generally there are ideas that work from all the paradigms. And a key mark of a good craftsman is that he can pick and use the appropriate tool in the appropriate situation.
-
@Benjamin-Hall said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Benjamin-Hall said in Functional programming rah! OOP nah! Or how to know you're a zealot:
- Generally a giant waste of money and time? Check
*cough* “billion dollar mistake” was an understatement after the cheap hacks showed up *cough*
To be slightly less , FP ideas make a decent amount of sense, taken in proper proportion. Sure, most data manipulation functions should be pure; immutable data structures make a decent amount of sense for things being passed around. FP ideology (which verges on cult-like), like any other computer science ideology, does not.
I'm very strongly against programming dogmas. Null makes sense some times (although it's best if it's explicit via some sort of Optional type). Writing tests is good; drinking the TDD coolaid is not (usually). DDD works for things it works for, but shouldn't be taken as a religion. Some things work best more OOP, others better as more FP, yet others work purely procedurally. And generally there are ideas that work from all the paradigms. And a key mark of a good craftsman is that he can pick and use the appropriate tool in the appropriate situation.
I can generally agree with most of that, but still need to point at that one sentence and say: “optional” is the FP answer to “null”.
-
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Benjamin-Hall said in Functional programming rah! OOP nah! Or how to know you're a zealot:
- Generally a giant waste of money and time? Check
*cough* “billion dollar mistake” was an understatement after the cheap hacks showed up *cough*
I've seen Hoare's "billion dollar mistake" argument, and while I usually have a great deal of respect for the guy, he's completely wrong on this point. First, his claiming responsibility for the problem in the first place is way off-base; as he acknowledged himself, the
null
concept was obvious enough that if he hadn't developed it, someone else would have at approximately the same time.Second and more importantly, the real mistake is not the existence of null. It's the failure of type systems to take null seriously for so long. If you have a type system where
nullable MyObject
is treated as something fundamentally different fromMyObject that we know exists
, the "billion dollar mistake" vanishes entirely.
-
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Benjamin-Hall said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Benjamin-Hall said in Functional programming rah! OOP nah! Or how to know you're a zealot:
- Generally a giant waste of money and time? Check
*cough* “billion dollar mistake” was an understatement after the cheap hacks showed up *cough*
To be slightly less , FP ideas make a decent amount of sense, taken in proper proportion. Sure, most data manipulation functions should be pure; immutable data structures make a decent amount of sense for things being passed around. FP ideology (which verges on cult-like), like any other computer science ideology, does not.
I'm very strongly against programming dogmas. Null makes sense some times (although it's best if it's explicit via some sort of Optional type). Writing tests is good; drinking the TDD coolaid is not (usually). DDD works for things it works for, but shouldn't be taken as a religion. Some things work best more OOP, others better as more FP, yet others work purely procedurally. And generally there are ideas that work from all the paradigms. And a key mark of a good craftsman is that he can pick and use the appropriate tool in the appropriate situation.
I can generally agree with most of that, but still need to point at that one sentence and say: “optional” is the FP answer to “null”.
But you can have an optional type (or the equivalent) without any of the rest of FP. It may have been popularized by FP folks, but it's separable from FP as a paradigm.
-
@Benjamin-Hall said in Functional programming rah! OOP nah! Or how to know you're a zealot:
It may have been popularized by FP folks, but it's separable from FP as a paradigm.
See also: LINQ. Like the popular JavaScript books meme, it gives you "the good parts" of FP without the overwhelming mountain of trash that FP cultists all too often try to drag along with it.
-
@Mason_Wheeler said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Benjamin-Hall said in Functional programming rah! OOP nah! Or how to know you're a zealot:
It may have been popularized by FP folks, but it's separable from FP as a paradigm.
See also: LINQ. Like the popular JavaScript books meme, it gives you "the good parts" of FP without the overwhelming mountain of trash that FP cultists all too often try to drag along with it.
Or even things like
Array.prototype.map
orArray.prototype.filter
(in Javascript), especially when combined with => functions. That's a functional-style interface to something you can do already with much cleaner look and easier to use and chain.But I feel the same way about OOP stuff. Interfaces? Great. But can be overdone. Inheritance? Only where necessary (aka UIs and a few other places) and as shallow as possible, please. Hard-nosed "only messages, no getters/setters"? Meh. Sure, most of the time passing messages (aka calling methods for most "OOP" languages) works well and keeps things decoupled.
Ravioli code is just as bad as spaghetti code.
-
@Mason_Wheeler said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Mason_Wheeler for values of “programmers” == “cheap hacks” and “mathematicians” == “computer scientists”, yes.
At least the latter try to do things like actually modeling a problem and coming up with correct solutions, instead of doing whatever sticks to the wall.
They’re probably also better at actually formalizing what “state” means. Type safety, race-free parallelism, etc.? Not something that originated from the “don’t put math in my programs ” crowd.The real problem, as mentioned above, is the people who can’t explain how things work without invoking the endofunctor cricket rule.
For "programmers" = "people who actually solve real problems" and "mathematicians" = "people who prefer to solve abstract, theoretical problems." The latter category is notorious for their inability to relate well to real concerns, and the FP tradition is a shining example of this problem.
Cliché. Case in point: Erlang/OTP. Ericsson's real-world problem was how to build a massively distributed system that's both scalable and resilient even in the face of hardware failures. Their solution was one of the closest things to pure FP that exists today. And judging by phone systems' usual reliability it's a pretty fucking solid solution. I don't think all the idiots work in Java and dotnettish-whatever and all the geniuses in Erlang, but I'd hate to depend on the reliability of your average Java application when I have to call 911.
-
@LaoC Yes. And there's a reason it's almost entirely unknown outside of telecommunications. It may be possible to build robust systems with Erlang, (or with any other language, for that matter,) but that doesn't make it intuitive or easy to work with.
-
@Mason_Wheeler said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@LaoC Yes. And there's a reason it's almost entirely unknown outside of telecommunications. It may be possible to build robust systems with Erlang, (or with any other language, for that matter,) but that doesn't make it intuitive or easy to work with.
It's like you're pretending that the legions of copy pasta coders who glue shit together that kinda sorta works if you look at it right and hold your breath don't exist.
"Intuitive" and "easy to work with" are pretty vague and shifting targets. But sure, if you've only worked with a particular sort of thing other things that look like that thing are going to seem intuitive and easy to work with.
-
@Carnage said in Functional programming rah! OOP nah! Or how to know you're a zealot:
If you have good developers, you can probably have them build great software on top of brainfuck.
And the reverse is also true. If you have bad developers, they can build brainfucks on top of great technologies.But part of the problem in programming is assuming that everyone is a "good developer". McDonald's success was not in making good food. It was in making food that anyone could make. When approaching problems I try to assume that everyone is a fucking idiot. My approach may not be "right", but it is generally successful. So far. "Create a better system and the world will create a more perfect idiot" and all that.
-
@Benjamin-Hall said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Benjamin-Hall said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Benjamin-Hall said in Functional programming rah! OOP nah! Or how to know you're a zealot:
- Generally a giant waste of money and time? Check
*cough* “billion dollar mistake” was an understatement after the cheap hacks showed up *cough*
To be slightly less , FP ideas make a decent amount of sense, taken in proper proportion. Sure, most data manipulation functions should be pure; immutable data structures make a decent amount of sense for things being passed around. FP ideology (which verges on cult-like), like any other computer science ideology, does not.
I'm very strongly against programming dogmas. Null makes sense some times (although it's best if it's explicit via some sort of Optional type). Writing tests is good; drinking the TDD coolaid is not (usually). DDD works for things it works for, but shouldn't be taken as a religion. Some things work best more OOP, others better as more FP, yet others work purely procedurally. And generally there are ideas that work from all the paradigms. And a key mark of a good craftsman is that he can pick and use the appropriate tool in the appropriate situation.
I can generally agree with most of that, but still need to point at that one sentence and say: “optional” is the FP answer to “null”.
But you can have an optional type (or the equivalent) without any of the rest of FP. It may have been popularized by FP folks, but it's separable from FP as a paradigm.
You won't want it. Without lambdas optionals are just a shitty but enforced way to null-check.
-
@LaoC said in Functional programming rah! OOP nah! Or how to know you're a zealot:
depend on the reliability of your average Java application when I have to call 911.
When the world was young, Java was known for its reliability and uptime. Compared to C or Perl.
-
@Polygeekery said in Functional programming rah! OOP nah! Or how to know you're a zealot:
When approaching problems I try to assume that everyone is a fucking idiot.
You're not wrong.
-
I like the idea of optionals but they're kind of annoying to work with. Plus the code looks kind of clunky, in scala anyway, when you have Option[Foo]. I like the syntax from kotlin. All specified types are non-nullable unless you put the nullable indicator on the type, like String? to allow a null string.
-
@ObjectMike said in Functional programming rah! OOP nah! Or how to know you're a zealot:
I like the syntax from kotlin. All specified types are non-nullable unless you put the nullable indicator on the type, like String? to allow a null string.
Yeah. That sort of thing is my preference.
-
@Polygeekery said in Functional programming rah! OOP nah! Or how to know you're a zealot:
But part of the problem in programming is assuming that everyone is a "good developer".
Programming has a minimum skill level for someone to be effective at doing it. Some find that level easy to attain; others... don't.
-
@Gribnit said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@LaoC said in Functional programming rah! OOP nah! Or how to know you're a zealot:
depend on the reliability of your average Java application when I have to call 911.
When the world was young, Java was known for its reliability and uptime. Compared to C or Perl.
Well, just read his statement again and mentally replace Java with “JS or Perl.”
Personally I’m glad that, so far, life critical things aren’t written by the kind of people that bring you IoS devices.
-
@ObjectMike said in Functional programming rah! OOP nah! Or how to know you're a zealot:
I like the syntax from kotlin. All specified types are non-nullable unless you put the nullable indicator on the type, like String? to allow a null string.
C# uses the '?' suffix as well. They possibly they stole it from there, or from a common source.
But in C# for compadebility reasons all non-primitives are nullable by default unless you turn on the right flag.
-
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@Gribnit said in Functional programming rah! OOP nah! Or how to know you're a zealot:
@LaoC said in Functional programming rah! OOP nah! Or how to know you're a zealot:
depend on the reliability of your average Java application when I have to call 911.
When the world was young, Java was known for its reliability and uptime. Compared to C or Perl.
Well, just read his statement again and mentally replace Java with “JS or Perl.”
Personally I’m glad that, so far, life critical things aren’t written by the kind of people that bring you IoS devices.
Or js frameworks.
-
@topspin said in Functional programming rah! OOP nah! Or how to know you're a zealot:
life critical things aren’t written by the kind of people that bring you IoS devices.