News for hackers. Stuff that matters.
Re:Less is exponentially more (2012) by ses1984 on Tuesday May 12, 2020 @10:20AM (#23154253)
>Programmers who come to Go from C++ and Java miss the idea of programming with types, particularly inheritance and subclassing and all that. Perhaps I'm a philistine about types but I've never found that model particularly expressive.

Whoa, hold it there... inheritance and subclassing are OOP, types is a different subject, right?

Re:Less is exponentially more (2012) by ChrisSD on Tuesday May 12, 2020 @10:26AM (#23154309)
To be honest programmers have a habit of being very loose with language. Terms like "OOP" and "types" have very context dependent meanings. Given the context, I took him to simply be talking about people coming from "class-based" languages, not anything to do with types in general.
Re:Less is exponentially more (2012) by fernmyth on Tuesday May 12, 2020 @10:34PM (#23162828)
> To be honest programmers have a habit of being very loose with language.

I wish this weren't true. It's quite damning.

It's less bad in a real-time conversation, with fast feedback about how well we're being understood. But it still hints that we don't have the concepts clear in our own minds.

Re:Less is exponentially more (2012) by ses1984 on Tuesday May 12, 2020 @11:44AM (#23155230)
Yeah but it feels almost like a strawman, it feels out of place.
Re:Less is exponentially more (2012) by acarl005 on Tuesday May 12, 2020 @11:17AM (#23154889)
Yes, he has conflated generics with inheritance/hierarchies. You can have generics without the mess that is inheritance.
Re:Less is exponentially more (2012) by dhsksndjsb on Tuesday May 12, 2020 @10:42AM (#23154524)
OOP involves a type hierarchy, which is a prerequisite for giving meaning to the idea of inheritance. You can't talk about classes without actually talking about types, and inheritance creates a type hierarchy.

From golang documentation:

"Although Go has types and methods and allows an object-oriented style of programming, there is no type hierarchy. The concept of “interface” in Go provides a different approach that we believe is easy to use and in some ways more general. There are also ways to embed types in other types to provide something analogous—but not identical—to subclassing. Moreover, methods in Go are more general than in C++ or Java: they can be defined for any sort of data, even built-in types such as plain, “unboxed” integers. They are not restricted to structs (classes).

Also, the lack of a type hierarchy makes “objects” in Go feel much more lightweight than in languages such as C++ or Java."

Re:Less is exponentially more (2012) by pjmlp on Tuesday May 12, 2020 @02:04PM (#23157409)
Nope, it depends pretty much on the OOP language, there are a couple of CS variants to chose from.