News for hackers. Stuff that matters.
Re:C++ the Good Parts (2014) by gpderetta on Thursday October 01, 2020 @07:18AM (#24649618)
if STL is OO then everything is OO.
Re:C++ the Good Parts (2014) by jcelerier on Thursday October 01, 2020 @11:04AM (#24651712)
> if STL is OO then everything is OO.

I mean... in the sense in which most people use "OO language" (which is, "a language with constructs which associates a data specification with procedures"), yes. Only hardcore pure-functional algorithms written in Haskell / ML without typeclasses, or things like Prolog, Esterel (though thinking about it), and similar research languages aren't.

Once upon a time programming looked like this. https://github.com/chrislgarry/Apollo-11/blob/master/Luminar...

Re:C++ the Good Parts (2014) by pjmlp on Thursday October 01, 2020 @07:43AM (#24649790)
Then remove the classes, static inheritance via template arguments, method dispatch via type parameters (very CLOS like), class member functions, iostreams, .....

Plenty of SIGPLAN papers to one educate themselves about what OOP is all about.

OOP is not MFC alone, apparently those that learn languages on the trenches without referring to them, never get to appreciate the wealth of information we have available.

Not surprising, given how many misunderstand "whatever my compiler does" for what ISO actually says.

Re:C++ the Good Parts (2014) by gpderetta on Thursday October 01, 2020 @08:03AM (#24649921)
OO is a very nebulously defined term and if you ask two people you'll get three different definitions. But I would say that most people will agree that at the very least late binding is a fundamental component.
Re:C++ the Good Parts (2014) by pjmlp on Thursday October 01, 2020 @08:22AM (#24650054)
Hence why having a proper CS education is an very important pillar for any good engineering degree.

Back to STL, it makes heavy use at compile time method dispatch via template metaprogramming and lambdas (which are implemented as classes actually by the compiler.

Re:C++ the Good Parts (2014) by gpderetta on Thursday October 01, 2020 @11:56AM (#24652386)
Stepanov has forgotten more about CS than I'll ever learn in an hundreds lifetimes and he is pretty adamant that STL is no OO [1].

I know this is an argumentum ab auctoritate, but you didn't really provide an argument either :)

[1] http://www.stlport.org/resources/StepanovUSA.html

Re:C++ the Good Parts (2014) by pjmlp on Thursday October 01, 2020 @12:23PM (#24652795)
He also thinks that Artificial Intelligence is an hoax, so take your pick.
Re:C++ the Good Parts (2014) by gpderetta on Thursday October 01, 2020 @12:30PM (#24652904)
FWIW, he is referring to the AI Winter, the interview was written well before the current AI renaissance.
Re:C++ the Good Parts (2014) by msla on Thursday October 01, 2020 @03:43PM (#24655375)
Did he say that about GOFAI or Deep Learning?
Re:C++ the Good Parts (2014) by Jtsummers on Thursday October 01, 2020 @03:46PM (#24655412)
In the context of the interview, it would've been GOFAI. Deep learning hadn't taken off yet.
Re:C++ the Good Parts (2014) by MiroF on Thursday October 01, 2020 @04:05PM (#24655602)
Well then it was a hoax?
Re:C++ the Good Parts (2014) by Jtsummers on Thursday October 01, 2020 @04:15PM (#24655710)
For context, the relevant answer:

> Yes. STL is not object oriented. I think that object orientedness is almost as much of a hoax as Artificial Intelligence. I have yet to see an interesting piece of code that comes from these OO people. In a sense, I am unfair to AI: I learned a lot of stuff from the MIT AI Lab crowd, they have done some really fundamental work: Bill Gosper's Hakmem is one of the best things for a programmer to read. AI might not have had a serious foundation, but it produced Gosper and Stallman (Emacs), Moses (Macsyma) and Sussman (Scheme, together with Guy Steele). I find OOP technically unsound. It attempts to decompose the world in terms of interfaces that vary on a single type. To deal with the real problems you need multisorted algebras - families of interfaces that span multiple types. I find OOP philosophically unsound. It claims that everything is an object. Even if it is true it is not very interesting - saying that everything is an object is saying nothing at all. I find OOP methodologically wrong. It starts with classes. It is as if mathematicians would start with axioms. You do not start with axioms - you start with proofs. Only when you have found a bunch of related proofs, can you come up with axioms. You end with axioms. The same thing is true in programming: you have to start with interesting algorithms. Only when you understand them well, can you come up with an interface that will let them work.

I have seen this a few times and have felt that "hoax" is the wrong word each time. Later he talks about OOP being "philosophically unsound", which adds some clarity to the statement. It's not that OOP or AI are made up (true hoaxes), it's that they will not accomplish (in his view) what they set out to do because they are founded on unsound bases.