News for hackers. Stuff that matters.
Re:Ask HN: Is Python dying? by pjmlp on Monday February 15, 2016 @02:55AM (#11102027)
You mean all those FP languages that happen to support OOP as well?

Lisp, Clojure - CLOS

OCaml - The O is for Objective, e.g. Objects

Scala, F# - Hybrid FP/OOP

Haskell - Type classes support polymorphism and extensibility.

Erlang - Message passing as envisioned by Smalltalk

So what are FP languages that have zero support for OOP concepts and are on the rise?

Re:Ask HN: Is Python dying? by pmarreck on Monday February 15, 2016 @10:50AM (#11103943)
Being a "hybrid FP/OOP" language is like taking a pure soup and allowing anyone to put a little bit of fecal matter in it and still thinking the product is "A-OK." ;)

Opinion aside, it's still true that some classes of algorithms are still too slow in FP and benefit from procedural mutation of state. But those should be managed very carefully as they destroy concurrency. I linked it elsewhere here but I think John Carmack's comments on this are quite lucid, and he is merely talking about using a functional style within OO languages: http://gamasutra.com/view/news/169296/Indepth_Functional_pro...

The thing is, 16-core CPU's are coming out soon, and we still have 99% of software that cannot take advantage of that well, at least within a single process.

One clarification

> Erlang - Message passing as envisioned by Smalltalk

Smalltalk, despite being called an "OO" language, did not come up with the gigantic class inheritance chains which have been attributed to OO.

Re:Ask HN: Is Python dying? by aninhumer on Monday February 15, 2016 @04:54AM (#11102467)
>Haskell - Type classes support polymorphism and extensibility.

While most of your examples are valid, I don't think Haskell is remotely object oriented. Type classes are not classes.

Re:Ask HN: Is Python dying? by pjmlp on Monday February 15, 2016 @05:01AM (#11102494)
Any Haskell coder knows that.

Quoting myself

> ... support polymorphism and extensibility.

OOP isn't only the C# and Java view of the world.

Re:Ask HN: Is Python dying? by aninhumer on Monday February 15, 2016 @08:54AM (#11103368)
Polymorphism and extensibility are features of OOP, but Haskell implements them in a rather different way to most OOP languages.

I realise people disagree about what exactly should be considered OOP, but personally I think not including inheritance in the definition broadens the term beyond usefulness.

Re:Ask HN: Is Python dying? by bulutsuzku on Monday February 15, 2016 @09:51PM (#11107615)
There is no disagreement, Smalltalk is the object system. Object-orientation was invented in Smalltalk. Other languages and systems are just poor imitations.
Re:Ask HN: Is Python dying? by provemewrong on Monday February 15, 2016 @03:50AM (#11102227)
To be pedantic, Clojure has nothing to do with CLOS. It does leverage JVM and lets you use objects and OOP patterns though.
Re:Ask HN: Is Python dying? by pjmlp on Monday February 15, 2016 @03:53AM (#11102236)
So where do you think multi-methods and protocols come from?
Re:Ask HN: Is Python dying? by provemewrong on Monday February 15, 2016 @05:52AM (#11102643)
Okay, TIL, still there's more OOP in Clojure beyond CLOS influences.