Hacker News new | past | comments | ask | show | jobs | submit login

> As are you!

Nope, I actually have empirical (and other) evidence.

> I did not claim unity moved to FP

EXACTLY. But you cited unity as evidence for FP being superior for performance than OO. As it doesn't use FP, it's actually not evidence for that.

> I've done OOP for a decade professionally before another decade of FP.

I did FP 30+ years ago and have been doing OO for around 40. So what? ¯\_(ツ)_/¯

Anyway, my evidence is not anecdotal, but empirical. There haven't been many studies on productivity, but those few have shown OO languages to be vastly more productive.

https://blog.metaobject.com/2019/02/why-architecture-oriente...

On re-reading John Hughes influential Why Functional Programming Matters, two things stood out for me.

The first was the claim that, "...a functional programmer is an order of magnitude more productive than his or her conventional counterpart, because functional programs are an order of magnitude shorter." That's a bold claim, though he cleverly attributes this claim not to himself but to unspecified others: "Functional programmers argue that...".

If there is evidence for this 10x claim, I'd like to see it. The only somewhat systematic assessment of "language productivity" is the Caper Jones language-level evaluation, which is computed on the lines of code needed to achieve a function point worth of software. In this evaluation, Haskell achieved a level of 7.5, whereas Smalltalk was rated 15, so twice as productive. While I don't see this is conclusive, it certainly doesn't support a claim of vastly superior productivity.

> Industry is moving...

Industry has lots of fads that come and go. Remember SOAP? Or CASE? Now that FP is starting to be used more in the real world, a lot of the shine has come off. This is always the case: things tend to work much better before you actually have to use them in the real world? "Runs best on a slide projector"

He was asked about scala, and said that if he would have to choose again today, he's not sure he would go with scala.

https://www.quora.com/Is-Twitter-getting-rid-of-Scala?share=...

> 3. ...does not use static types... reliability and security.

Once again, there is no empirical evidence that static types improve reliability and security, and it's not for lack of trying to make that claim. The claim has been made multiple times, but always fails to actually be true.

The most recent study to make that claim was demolished at SPLASH '19.

https://2019.splashcon.org/details/splash-2019-oopsla/75/On-...

So very strict static types do not actually improve safety, that has been proven over and over again. What they actually do provide is safyness, the feeling that your code is safer:

https://blog.metaobject.com/2014/06/the-safyness-of-static-t...

Also, "does not use static types" is a straw man these days. The approach that appears to be gaining traction is hybrid typing, with some parts statically typed, some parts dynamically typed.

> Fred Brookes is just one US academic.

Fred Brooks is not an academic.

https://en.wikipedia.org/wiki/Fred_Brooks

He and Alan Kay both received Turing awards and pretty much every other prestigious prize in the industry you care to name. You are obviously free to dismiss them, but that mostly reflects on you and not on them, and it's kind of weird to do that when you refer to their work, particularly Fred Brook's seminal No Silver Bullet – Essence and Accident in Software Engineering, to make your point.

It really helps to actually know something about people or approaches before dismissing out of hand.

> My point was that the US is very heavily invested in OOP,

Because it works. They are a very pragmatic bunch.

> it's what the universities exclusively teach.

Not true, or at least causally inverted. For example, MIT taught Scheme for a long time. And switched away from it, because the people teaching it no longer saw it as a benefit. Did I mention "pragmatic bunch"?

Me, I went to University in Germany back in the late 80s early 90s, and was tortured with FP by the zealots from the very start (though I did take it all the way to "Advanced FP" and did my exam for the course on Backus's FP calculus, which I actually liked a lot, and yes, I aced that exam). Of course, being exposed to FP from so early on made me realise very quickly that the emperor had no clothes.

> Outside the US, OOP has always been much less popular.

On the fact that most software is written on one side of the Atlantic Ocean -- Alan Kay (in response to Dijsktra's On the fact that the Atlantic Ocean has two sides, http://lambda-the-ultimate.org/node/2087 )




> Nope, I actually have empirical (and other) evidence.

You haven't provided any concrete evidence. Certainly no more than I have.

> But you cited unity as evidence for FP being superior for performance than OO

No, I provided it as evidence of OO being poor for performance and suggested that its new approach is closer to FP (i.e data centric). Perhaps a better example is Apache Spark or Google MapReduce for large scale data processing. Those frameworks are essentially FP, it's why lambdas were added to Java. So there's plenty of evidence that FP works for high performance.

> I did FP 30+ years ago and have been doing OO for around 40.

FP has matured a lot in 30 years. My point was that I have equal amounts of both and I have no reason to be biased. If you've done 40 years of mostly OOP, I'm not sure you can make the same claim.

> He was asked about scala, and said that if he would have to choose again today, he's not sure he would go with scala.

Scala is absolutely not a functional programming language and Odersky never claimed it was. It's primarily an object-oriented language with some functional features bolted on. Functions are not first-class and pervasive mutable state still exists. It would be just as unfair for me to judge OOP based on the shortcomings of C++.

> Because it works.

What do you mean "works"? Yes I can get the job done in OOP, but it has all the problems I have tried to articulate previously.

> Fred Brooks is not an academic.

From the article you linked: "In 1964, Brooks accepted an invitation to come to the University of North Carolina at Chapel Hill and founded the University's computer science department. He chaired it for 20 years. As of 2013 he was still engaged in active research there"

So you are really splitting hairs here. Does it matter?

> It really helps to actually know something about people or approaches before dismissing out of hand.

Can we please refrain from personal insults and keep the debate civil. I have spent a decade reading the books and teachings of these people; and trying to apply their ideas in industry. I am not dismissing them out of hand - that's why I cite them sometimes. I could accuse you of doing the same for FP and its community, but I won't as it would be unfair.


> You haven't provided any concrete evidence.

Actually, I did. Snipping it from the replies and ignoring doesn't, in fact, make that evidence go away.

Whereas you have provided exactly zero evidence for your claims, except for repeating your opinion.

>What do you mean "works"?

It gets the job done effectively and efficiently. Caper Jones found half the effort to implement the same function points in Smalltalk vs. Haskell.

> FP has matured a lot in 30 years.

Not really. Still the same hyperbolic claims, and still the same meagre results.

> [OO] has all the problems I have tried to articulate previously.

No it doesn't, and just repeating an opinion over and over doesn't turn that opinion into fact.

> [Frederick Brooks an academic] Does it matter?

If it doesn't matter, then why did you bring it up? Oh right, to dismiss his widely cited article that you yourself referenced as "just one academic's opinion". Well, he is not, in fact "just" an academic, but has more practical experience with software than most people on the planet, including you and me. He is also an academic. So someone with vast amounts of industrial and academic experience and expertise.

> keep the debate civil.

It would have been nice had you done that.

Anyway, it is clear that you aren't interested in evidence or reasoned debate, so I think we can call it a day.

Have a good one.


The evidence you provided was for strawman arguments, something you accused me of. I'm sure Smalltalk can be easier / more "productive" than Haskell, but I never made any claims about Haskell. I'm sure many static type systems are bad, but it doesn't prove all are bad. You didn't provide evidence to address any of my specific issues with OOP, e.g. pervasive mutable and hidden state is an impediment to composition.

For the record, I happen to really respect Fred Brooks, Alan Kay and a lot of what OOP has achieved (for example first-class modules). I called Brooks an "academic" as an acknowledgement that he has made big contributions, not as a putdown as you seem to imply. You are trying to paint me as an FP zealot, but I use both and appreciate the best parts of both. It is you that are coming across as heavily biased. Even your domain name has "object" in it.

Enjoy your objects!


What you wrote is "Fred Brookes is just one US academic." That is not a positive statement or an acknowledgement that he has made big contributions, that is a dismissal of what he wrote.

   ./sentiment.st 'Fred Brookes is just one US academic.'
   {
     label: neg;
        probability: {
            neg: 0.5681116649451591;
            neutral: 0.4912856963089782;
            pos: 0.4318883350548409;
        };
   }
The key is the "just one":

   ./sentiment.st 'Fred Brookes is one US academic.' 
   {
       label: pos;
       probability: {
           neg: 0.4517101153187268;
           neutral: 0.4880877595448765;
           pos: 0.5482898846812732;
       };
   }
And replacing the "one" with "a":

   ./sentiment.st 'Fred Brookes is a US academic.'
   {
       label: neutral;
       probability: {
           neg: 0.4032643317660632;
           neutral: 0.7398809320488215;
           pos: 0.5967356682339368;
       };
   }
So we go from -0.57/+0.43 for your formulation to +0.6/-0.4 for a neutral formulation, a swing from negative to positive of 34%. Pretty substantive, if you ask me.

The sentiment.st script:

   #!env stsh
   #-sentiment:text
   (ref:http://text-processing.com/api/sentiment/ postForm: #{ #text: text }) 

Anyway, glad to hear that this statement of yours was not a reflection of your actual views.

[Caper Jones: Smalltalk twice as productive as Haskell]

> I never made any claims about Haskell

You made claims about FP and OO in general, and in particular questioned my statement that "OO gets the job done" and also claimed I provided no evidence for my claims. Haskell is an FP language and Smalltalk is an OO language, and both are considered premier exemplars of their respective genres. Being twice as productive sure sounds like "getting the job done" to me and there is empirical evidence for this being true.

> I'm sure many static type systems are bad, but it doesn't prove all are bad.

Nobody claimed that all static type systems are bad. However, the evidence is in that any claims of "obvious" superiority of static typing over dynamic typing for safety are plain wrong. Such as your original claim:

> Static typing is (obviously) safer than dynamic types.

Glad to see that you're now walking that earlier categorical statement back to "not all static type systems are bad", something I can agree with. I am actually pretty sure some are fairly good, particularly the non-bondage-and-discipline ones (gradual/hybrid) have a decent chance.

As a matter of fact, I am currently in the process of improving the fairly minimal type support in my own programming language. And I even have some ideas in the back of my mind of how to do non-horrible generics, but that isn't the primary focus.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: