News for hackers. Stuff that matters.
Re:I Don't Use Classes by gigatexal on Thursday March 12, 2020 @10:49AM (#22557419)
A whole article and no code examples. Fail.
Re:I Don't Use Classes by crimsonalucard on Thursday March 12, 2020 @01:15PM (#22559152)
Even if he did present code examples I doubt it would change your mind.

I think OOP people should be aware that there is significant backlash against OOP among smart people who are very familiar with the paradigm and they should take the time to understand why.

The division is real and given the invention of languages like GO and RUST that do not have classes I would think really hard about the topic.

Re:I Don't Use Classes by dith3r on Thursday March 12, 2020 @02:42PM (#22560225)
GO is simple decomposition of OOP, class was split into structure (with composition) and interface(with multiple inheritance without implicit definition what interfaces can can coop with structure). Go only restricted that you cannot define virtual methods.
Re:I Don't Use Classes by crimsonalucard on Thursday March 12, 2020 @05:22PM (#22561900)
Rob Pike designed Go with the philosophy for people not to use structs like classes. This is intentional and deliberate.

If you are using GO like you use OO, you've missed the entire point.

https://twitter.com/rob_pike/status/942528032887029760

Re:I Don't Use Classes by dith3r on Friday March 13, 2020 @04:24AM (#22565637)
Please read carefully what I've written. I've never said that struct == class. Secondly Rop Pike wrote under tweet: `But the more important idea is the separation of concept: data and behavior are two distinct concepts in Go, not conflated into a single notion of "class".` which only proves what I presented in first comment.
Re:I Don't Use Classes by crimsonalucard on Friday March 13, 2020 @04:38AM (#22565704)
Please carefully read what I wrote. I never claimed you said struct == class.

You literally said go removed virtual methods. This is not what pike is talking about. Pike is talking about putting a function onto your struct. This is legal in go as functions are first class but rob is saying it should be done sparingly because data and behavior need to be distinct concepts.

It is not me who failed to parse your writing, but you who failed to understand pike and my comment.

Re:I Don't Use Classes by optimuspaul on Thursday March 12, 2020 @12:41PM (#22558681)
I was thinking the same. His arguments seem thin at best and suggest a misunderstanding of what OOP really means.
Re:I Don't Use Classes by crimsonalucard on Thursday March 12, 2020 @01:12PM (#22559093)
I would argue that a heavy practitioner of OOP, and one who does not see the extreme downsides of using that paradigm is actually the person who misunderstands Programming in general and what OOP is in that context.

Say if you practiced procedural programming in a very heavy way and typed functional programming in a major way along with OOP then you would have a better picture.

If you practiced OOP exclusively for the majority of your career I would argue your view point is flawed and biased. Over the years, as a programmer with a lot of heavy experience in all of the paradigms mentioned above, I have found that OOP is in fact not an apples and oranges comparison to other programming styles but is in fact a highly flawed paradigm.