News for hackers. Stuff that matters.
Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by lomnakkus on Friday June 30, 2017 @06:41PM (#14673993)
> Aggregation, composition, encapsulation are as are much as fundamental notions in OOP as inheritance.

You say that as if these things are not just as easily expressed in FP -- if not even easier.

Aggregation is just records-of-records.

Encapsulation is just "abstract data types", e.g. ML modules with abstract members, or non-exported data constructors in Haskell. Another option would be simply closing over whatever you're trying to hide. Another option would be existential types. (There's some overlap among all of these.)

Composition... well, actually I'm not sure what exactly you mean by "composition" in the context of OO. Can you explain what you mean?

Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by bushin on Friday June 30, 2017 @07:01PM (#14674087)
Reminds me of PHP CEO's tweet: "If you had bad experiences with scrum you just did scrum wrong. If you had good experiences making software you just accidentally did scrum".
Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by catnaroek on Friday June 30, 2017 @11:55PM (#14675284)
> ML modules with abstract members

So true! Sadly, most programmers' idea of an “abstract data type” is a class. :-p

Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by lomnakkus on Saturday July 08, 2017 @07:49AM (#14725074)
Booyakasha! :)
Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by soulbadguy on Friday June 30, 2017 @07:26PM (#14674195)
> You say that as if these things are not just as easily expressed in FP

No, that's what you read. What i said what was i wrote... OOP is bigger than inheritance.

> -- if not even easier.

Again, this kind of statement really sound like empty FP propaganda to me.

> Encapsulation is just "abstract data types", e.g. ML modules with abstract members, or non-exported data constructors in Haskell. Another option would be simply closing over whatever you're trying to hide. Another option would be existential types. (There's some overlap among all of these.)

Or "abstract data types" is just Encapsulation...

Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by lomnakkus on Saturday July 01, 2017 @03:17PM (#14678497)
> No, that's what you read.

I think you may have misunderstood my intent. I was just trying to say "FP can do these things too".

> Again, this kind of statement really sound like empty FP propaganda to me.

Right, so any type of even very modest support for X is "empty X propaganda". Can we please assume at least a modicum of good faith here?

> Or "abstract data types" is just Encapsulation...

Oh, so "semantics" it is then. Oh, well.

FWIW, I think I'm right in saying that ADTs were invented quite a bit before OOP & "Encapsulation".

I notice that you also didn't answer my question of what Composition actually means in OOP. Do you have an answer? I promise, I wasn't being facetious.

Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by seanmcdirmid on Saturday July 01, 2017 @10:03AM (#14677146)
OOP is simply programming with objects. You can do that in a language of functions, you can also program with functions with a language of objects.
Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by lomnakkus on Saturday July 01, 2017 @03:58PM (#14678668)
Define "objects", please.
Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by seanmcdirmid on Saturday July 01, 2017 @10:47PM (#14680582)
That's easy, the word is well defined in the dictionary: a person or thing to which a specified action or feeling is directed. Some people try to call objects entities and claim they are doing something else, but they are just doing the same thing with different words.
Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by lomnakkus on Friday July 07, 2017 @07:26PM (#14723029)
Uh, how does that relate to the semantics of the language? (Formally, not dictionarily.)

EDIT: I was being a bit facetious, but we were discussing programming languages, so maybe not that much of a stretch...?